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

## Class CloudLegacySolrClient

- java.lang.Object
- - org.apache.solr.client.solrj.SolrClient
  - - org.apache.solr.client.solrj.impl.CloudSolrClient
    - - org.apache.solr.client.solrj.impl.CloudLegacySolrClient

All Implemented Interfaces:
  `Closeable`, `Serializable`, `AutoCloseable`

    @Deprecated(since="9.0")
    public class CloudLegacySolrClient
    extends CloudSolrClient

Deprecated.
Please use `CloudSolrClient`
SolrJ client class to communicate with SolrCloud. Instances of this class communicate with Zookeeper to discover Solr endpoints for SolrCloud collections, and then use the `LBHttpSolrClient` to issue requests.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `CloudLegacySolrClient.Builder` Deprecated. Constructs `CloudLegacySolrClient` 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
`static String` `STATE_VERSION` Deprecated.

### Fields inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient

`collectionStateCache, locks, retryExpiryTimeNano`

### Fields inherited from class org.apache.solr.client.solrj.SolrClient

`defaultCollection`

### Constructor Summary

Constructors
`protected` `CloudLegacySolrClient​(CloudLegacySolrClient.Builder builder)` Deprecated. 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 Deprecated Methods
`void` `close()` Deprecated.
`protected Map<String,​LBSolrClient.Req>` `createRoutes​(UpdateRequest updateRequest, ModifiableSolrParams routableParams, DocCollection col, DocRouter router, Map<String,​List<String>> urlMap, String idField)` Deprecated.
`ClusterStateProvider` `getClusterStateProvider()` Deprecated.
`org.apache.http.client.HttpClient` `getHttpClient()` Deprecated.
`LBHttpSolrClient` `getLbClient()` Deprecated.
`protected CloudSolrClient.RouteException` `getRouteException​(SolrException.ErrorCode serverError, NamedList<Throwable> exceptions, Map<String,​? extends LBSolrClient.Req> routes)` Deprecated.
`protected boolean` `wasCommError​(Throwable rootCause)` Deprecated. Is this a communication error? We will retry if so.

### Methods inherited from class org.apache.solr.client.solrj.impl.CloudSolrClient

`condenseResponse, condenseResponse, connect, connect, getClusterState, getDocCollection, getMinAchievedReplicationFactor, getParser, getRequestWriter, 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`

### Field Detail

#### STATE_VERSION

    public static final String STATE_VERSION

Deprecated.

See Also:
  Constant Field Values

### Constructor Detail

#### CloudLegacySolrClient

    protected CloudLegacySolrClient​(CloudLegacySolrClient.Builder builder)

Deprecated.
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 `CloudLegacySolrClient.Builder` with the options used to create the client.

### Method Detail

#### createRoutes

    protected Map<String,​LBSolrClient.Req> createRoutes​(UpdateRequest updateRequest,
                                                              ModifiableSolrParams routableParams,
                                                              DocCollection col,
                                                              DocRouter router,
                                                              Map<String,​List<String>> urlMap,
                                                              String idField)

Deprecated.

Overrides:
  `createRoutes` in class `CloudSolrClient`

#### getRouteException

    protected CloudSolrClient.RouteException getRouteException​(SolrException.ErrorCode serverError,
                                                               NamedList<Throwable> exceptions,
                                                               Map<String,​? extends LBSolrClient.Req> routes)

Deprecated.

Overrides:
  `getRouteException` in class `CloudSolrClient`

#### close

    public void close()
               throws IOException

Deprecated.

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

#### getLbClient

    public LBHttpSolrClient getLbClient()

Deprecated.

Specified by:
  `getLbClient` in class `CloudSolrClient`

#### getHttpClient

    public org.apache.http.client.HttpClient getHttpClient()

Deprecated.

#### getClusterStateProvider

    public ClusterStateProvider getClusterStateProvider()

Deprecated.

Specified by:
  `getClusterStateProvider` in class `CloudSolrClient`

#### wasCommError

    protected boolean wasCommError​(Throwable rootCause)

Deprecated.
Description copied from class: `CloudSolrClient`
Is this a communication error? We will retry if so.

Overrides:
  `wasCommError` in class `CloudSolrClient`