Class CloudHttp2SolrClient
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrClient
-
- org.apache.solr.client.solrj.impl.CloudSolrClient
-
- org.apache.solr.client.solrj.impl.CloudHttp2SolrClient
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
public class CloudHttp2SolrClient extends CloudSolrClient
SolrJ client class to communicate with SolrCloud using Http2SolrClient. Instances of this class communicate with Zookeeper to discover Solr endpoints for SolrCloud collections, and then use theLBHttp2SolrClient
to issue requests.- Since:
- solr 8.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloudHttp2SolrClient.Builder
ConstructsCloudHttp2SolrClient
instances from provided configuration.-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient
CloudSolrClient.RouteException, CloudSolrClient.RouteResponse<T extends LBSolrClient.Req>
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient
collectionStateCache, locks, retryExpiryTimeNano, STATE_VERSION
-
Fields inherited from class org.apache.solr.client.solrj.SolrClient
defaultCollection
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CloudHttp2SolrClient(CloudHttp2SolrClient.Builder builder)
Create a new client object that connects to Zookeeper and is always aware of the SolrCloud state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ClusterStateProvider
getClusterStateProvider()
Http2SolrClient
getHttpClient()
LBHttp2SolrClient
getLbClient()
protected boolean
wasCommError(Throwable rootCause)
-
Methods inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient
condenseResponse, condenseResponse, connect, connect, createRoutes, getClusterState, getDocCollection, getMinAchievedReplicationFactor, getParser, getRequestWriter, getRouteException, getShardReplicationFactor, isDirectUpdatesToLeadersOnly, isParallelUpdates, isUpdatesToLeaders, objectList, request, requestWithRetryOnStaleState, sendRequest, setCollectionCacheTTl, setDefaultCollection, setParallelCacheRefreshes, setParser, setRequestWriter, setRetryExpiryTime
-
Methods 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, getBinder, 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
-
-
-
-
Constructor Detail
-
CloudHttp2SolrClient
protected CloudHttp2SolrClient(CloudHttp2SolrClient.Builder builder)
Create a new client object that connects to Zookeeper and is always aware of the SolrCloud state. If there is a fully redundant Zookeeper quorum and SolrCloud has enough replicas for every shard in a collection, there is no single point of failure. Updates will be sent to shard leaders by default.- Parameters:
builder
- aHttp2SolrClient.Builder
with the options used to create the client.
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classCloudSolrClient
- Throws:
IOException
-
getLbClient
public LBHttp2SolrClient getLbClient()
- Specified by:
getLbClient
in classCloudSolrClient
-
getClusterStateProvider
public ClusterStateProvider getClusterStateProvider()
- Specified by:
getClusterStateProvider
in classCloudSolrClient
-
getHttpClient
public Http2SolrClient getHttpClient()
-
wasCommError
protected boolean wasCommError(Throwable rootCause)
- Specified by:
wasCommError
in classCloudSolrClient
-
-