Package org.apache.solr.client.solrj.impl

## 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 the `LBHttp2SolrClient` to issue requests.

Since:
  solr 8.0
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `CloudHttp2SolrClient.Builder` Constructs `CloudHttp2SolrClient` 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
`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
`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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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` - a `Http2SolrClient.Builder` with the options used to create the client.

### Method Detail

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `CloudSolrClient`
Throws:
  `IOException`

#### getLbClient

    public LBHttp2SolrClient getLbClient()

Specified by:
  `getLbClient` in class `CloudSolrClient`

#### getClusterStateProvider

    public ClusterStateProvider getClusterStateProvider()

Specified by:
  `getClusterStateProvider` in class `CloudSolrClient`

#### getHttpClient

    public Http2SolrClient getHttpClient()

#### wasCommError

    protected boolean wasCommError​(Throwable rootCause)

Specified by:
  `wasCommError` in class `CloudSolrClient`