Class ConcurrentUpdateBaseSolrClient
java.lang.Object
org.apache.solr.client.solrj.SolrClient
org.apache.solr.client.solrj.impl.ConcurrentUpdateBaseSolrClient
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
A ConcurrentUpdate
SolrClient -- it sends updates concurrently and asynchronously.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConstructsConcurrentUpdateBaseSolrClientinstances from provided configuration.protected static classstatic interfaceAbstraction for streaming HTTP response handling inConcurrentUpdateBaseSolrClient.protected static final recordClass representing an UpdateRequest and an optional collection.Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrClient
SolrClient.SolrClientFunction<C extends SolrClient,R> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected longprotected final ConcurrentUpdateBaseSolrClient.CustomBlockingQueue<ConcurrentUpdateBaseSolrClient.Update> protected StallDetectionFields inherited from class org.apache.solr.client.solrj.SolrClient
defaultCollection -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()protected abstract ConcurrentUpdateBaseSolrClient.StreamingResponsevoidhandleError(Throwable ex) protected voidvoidonSuccess(Object responseMetadata, InputStream respBody) Intended to be used as an extension point for doing post-processing after a request completes.request(SolrRequest<?> request, String collection) Execute a request against a Solr server for a given collectionvoidMethods inherited from class org.apache.solr.client.solrj.SolrClient
add, add, add, add, add, 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, getById, getById, getById, getById, getById, getById, getById, getById, getContext, getDefaultCollection, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
-
Field Details
-
basePath
-
queue
protected final ConcurrentUpdateBaseSolrClient.CustomBlockingQueue<ConcurrentUpdateBaseSolrClient.Update> queue -
pollQueueTimeMillis
protected long pollQueueTimeMillis -
stallDetection
-
-
Constructor Details
-
ConcurrentUpdateBaseSolrClient
-
-
Method Details
-
doSendUpdateStream
protected abstract ConcurrentUpdateBaseSolrClient.StreamingResponse doSendUpdateStream(ConcurrentUpdateBaseSolrClient.Update update) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
notifyQueueAndRunnersIfEmptyQueue
protected void notifyQueueAndRunnersIfEmptyQueue() -
request
public NamedList<Object> request(SolrRequest<?> request, String collection) throws SolrServerException, IOException Description copied from class:SolrClientExecute a request against a Solr server for a given collection- Specified by:
requestin classSolrClient- Parameters:
request- the request to executecollection- the collection to execute the request against- Returns:
- a
NamedListcontaining the response from the server - Throws:
SolrServerException- if there is an error on the serverIOException- If there is a low-level I/O error.
-
blockUntilFinished
- Throws:
IOException
-
handleError
-
onSuccess
Intended to be used as an extension point for doing post-processing after a request completes.- Parameters:
responseMetadata- implementation-specific response object (e.g., Jetty Response), may be nullrespBody- the body of the response, subclasses must not close this stream.
-
close
public void close() -
shutdownNow
public void shutdownNow()
-