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 theLBHttp2SolrClientto issue requests.- Since:
- solr 8.0
- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCloudHttp2SolrClient.BuilderConstructsCloudHttp2SolrClientinstances 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, STATE_VERSION
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCloudHttp2SolrClient(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 voidclose()ClusterStateProvidergetClusterStateProvider()Http2SolrClientgetHttpClient()LBHttp2SolrClientgetLbClient()protected booleanwasCommError(Throwable rootCause)-
Methods inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient
condenseResponse, condenseResponse, connect, connect, createRoutes, getClusterState, getDefaultCollection, getDocCollection, getMinAchievedReplicationFactor, getParser, getRequestWriter, getRouteException, getShardReplicationFactor, isDirectUpdatesToLeadersOnly, isParallelUpdates, isUpdatesToLeaders, objectList, registerCollectionStateWatcher, registerDocCollectionWatcher, request, requestWithRetryOnStaleState, sendRequest, setCollectionCacheTTl, setDefaultCollection, setParallelCacheRefreshes, setParser, setRequestWriter, setRetryExpiryTime, waitForState, waitForState
-
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, 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.Builderwith the options used to create the client.
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classCloudSolrClient- Throws:
IOException
-
getLbClient
public LBHttp2SolrClient getLbClient()
- Specified by:
getLbClientin classCloudSolrClient
-
getClusterStateProvider
public ClusterStateProvider getClusterStateProvider()
- Specified by:
getClusterStateProviderin classCloudSolrClient
-
getHttpClient
public Http2SolrClient getHttpClient()
-
wasCommError
protected boolean wasCommError(Throwable rootCause)
- Specified by:
wasCommErrorin classCloudSolrClient
-
-