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,
java.lang.String searchClusterName,
java.lang.String collectionId,
MetricRegistry metricRegistry,
java.lang.String defaultSolrCollection) |
Modifier and Type | Method and Description |
---|---|
UpdateResponse |
add(java.util.Collection<SolrInputDocument> docs) |
UpdateResponse |
add(java.util.Collection<SolrInputDocument> docs,
int commitWithinMs) |
UpdateResponse |
add(SolrInputDocument doc,
int commitWithinMs) |
UpdateResponse |
add(java.lang.String solrCollection,
java.util.Collection<SolrInputDocument> docs,
int commitWithinMs) |
UpdateResponse |
add(java.lang.String collection,
SolrInputDocument doc,
int commitWithinMs) |
void |
close() |
int |
flush() |
<any> |
request(SolrRequest request,
java.lang.String collection) |
void |
syncFlush() |
public BufferingSolrServer(SolrClient delegate, int maxBufferSize, long maxFlushIntervalMillis)
public BufferingSolrServer(SolrClient delegate, int maxBufferSize, long maxFlushIntervalMillis, int concurrency, java.lang.String searchClusterName, java.lang.String collectionId, MetricRegistry metricRegistry, java.lang.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 java.io.IOException
java.io.IOException
public UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException
public UpdateResponse add(java.util.Collection<SolrInputDocument> docs) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException
public UpdateResponse add(java.util.Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException
public UpdateResponse add(java.lang.String solrCollection, java.util.Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException
public UpdateResponse add(java.lang.String collection, SolrInputDocument doc, int commitWithinMs) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException
public <any> request(SolrRequest request, java.lang.String collection) throws SolrServerException, java.io.IOException
SolrServerException
java.io.IOException