public class BufferingSolrServer extends SolrClient
SolrClient
instance and adds a simple buffer on top of it.
The life cycle of wrapped SolrClient instance should be managed elsewhere.
You should properly shutdown this instance with a shutdown method.Constructor and Description |
---|
BufferingSolrServer(SolrClient delegate,
int maxBufferSize,
long maxFlushIntervalMillis) |
BufferingSolrServer(SolrClient delegate,
int maxBufferSize,
long maxFlushIntervalMillis,
int concurrency,
String searchClusterName,
String collectionId,
MetricRegistry metricRegistry,
String defaultSolrCollection) |
Modifier and Type | Method and Description |
---|---|
org.apache.solr.client.solrj.response.UpdateResponse |
add(Collection<SolrInputDocument> docs) |
org.apache.solr.client.solrj.response.UpdateResponse |
add(Collection<SolrInputDocument> docs,
int commitWithinMs) |
org.apache.solr.client.solrj.response.UpdateResponse |
add(SolrInputDocument doc,
int commitWithinMs) |
org.apache.solr.client.solrj.response.UpdateResponse |
add(String solrCollection,
Collection<SolrInputDocument> docs,
int commitWithinMs) |
org.apache.solr.client.solrj.response.UpdateResponse |
add(String collection,
SolrInputDocument doc,
int commitWithinMs) |
void |
close() |
int |
flush() |
NamedList<Object> |
request(SolrRequest request,
String collection) |
void |
syncFlush() |
add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
public BufferingSolrServer(SolrClient delegate, int maxBufferSize, long maxFlushIntervalMillis)
public BufferingSolrServer(SolrClient delegate, int maxBufferSize, long maxFlushIntervalMillis, int concurrency, String searchClusterName, String collectionId, MetricRegistry metricRegistry, String defaultSolrCollection)
delegate
- maxBufferSize
- maxFlushIntervalMillis
- concurrency
- searchClusterName
- for diagnostic purposes onlycollectionId
- for diagnostic purposes onlymetricRegistry
- public void syncFlush()
public int flush()
public void close() throws IOException
IOException
public org.apache.solr.client.solrj.response.UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException
add
in class SolrClient
SolrServerException
IOException
public org.apache.solr.client.solrj.response.UpdateResponse add(Collection<SolrInputDocument> docs) throws SolrServerException, IOException
add
in class SolrClient
SolrServerException
IOException
public org.apache.solr.client.solrj.response.UpdateResponse add(Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException
add
in class SolrClient
SolrServerException
IOException
public org.apache.solr.client.solrj.response.UpdateResponse add(String solrCollection, Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException
add
in class SolrClient
SolrServerException
IOException
public org.apache.solr.client.solrj.response.UpdateResponse add(String collection, SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException
add
in class SolrClient
SolrServerException
IOException
public NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
request
in class SolrClient
SolrServerException
IOException