Class LBAsyncSolrClient
java.lang.Object
org.apache.solr.client.solrj.SolrClient
org.apache.solr.client.solrj.impl.LBSolrClient
org.apache.solr.client.solrj.impl.LBAsyncSolrClient
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
A
LBSolrClient adding requestAsync(Req).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.impl.LBSolrClient
LBSolrClient.Builder<C extends HttpSolrClientBase>, LBSolrClient.Endpoint, LBSolrClient.EndpointIterator, LBSolrClient.EndpointWrapper, LBSolrClient.Req, LBSolrClient.RspNested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrClient
SolrClient.SolrClientFunction<C extends SolrClient,R> -
Field Summary
FieldsFields inherited from class org.apache.solr.client.solrj.impl.LBSolrClient
aliveCheckIntervalMillis, parser, requestWriter, RETRY_CODES, UPDATE_LIVE_SERVER_MESSAGE, zombieServersFields inherited from class org.apache.solr.client.solrj.SolrClient
defaultCollection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpSolrClientBasegetClient(LBSolrClient.Endpoint endpoint) Execute an asynchronous request against one or more hosts for a given collection.protected abstract CompletableFuture<NamedList<Object>> requestAsyncWithUrl(SolrClient client, String baseUrl, SolrRequest<?> request) Methods inherited from class org.apache.solr.client.solrj.impl.LBSolrClient
addSolrServer, close, createServerWrapper, doRequest, getParser, getRequestWriter, makeServerAZombie, makeServerAZombie, makeServerAZombie, normalize, pickServer, removeSolrServer, request, request, request, reviveZombieServer, updateAliveListMethods 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
-
solrClient
-
-
Constructor Details
-
LBAsyncSolrClient
-
-
Method Details
-
getClient
- Specified by:
getClientin classLBSolrClient
-
requestAsync
Execute an asynchronous request against one or more hosts for a given collection. The passed-in Req object includes a List of Endpoints. This method always begins with the first Endpoint in the list and if unsuccessful tries each in turn until the request is successful. Consequently, this method does not actually Load Balance. It is up to the caller to shuffle the List of Endpoints if Load Balancing is desired.- Parameters:
req- the wrapped request to perform- Returns:
- a
CompletableFuturethat tracks the progress of the async request.
-
requestAsyncWithUrl
protected abstract CompletableFuture<NamedList<Object>> requestAsyncWithUrl(SolrClient client, String baseUrl, SolrRequest<?> request) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-