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

# Class HttpClusterStateProvider<C extends HttpSolrClientBase>

java.lang.Object
org.apache.solr.client.solrj.impl.BaseHttpClusterStateProvider
org.apache.solr.client.solrj.impl.HttpClusterStateProvider<C>

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `ClusterStateProvider`, `SolrCloseable`

public class HttpClusterStateProvider<C extends HttpSolrClientBase> extends BaseHttpClusterStateProvider
A CSP that uses Solr HTTP APIs.

## Field Summary

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

`SYS_PROP_CACHE_TIMEOUT_SECONDS`

## Constructor Summary

Constructors
Constructor
Description
`HttpClusterStateProvider(List<String> solrUrls, C httpClient)`
Provide the solr urls and a solr http client for this cluster state provider to use.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`C`
`getHttpClient()`
`protected C`
`getSolrClient(String baseUrl)`
Create a SolrClient implementation that uses the specified Solr node URL

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

`connect, getAliasProperties, getCacheTimeout, getClusterProperties, getClusterProperty, getClusterState, getCollection, getLiveNodes, getPolicyNameByCollection, getQuorumHosts, getState, initConfiguredNodes, isClosed, resolveAlias, resolveAlias, resolveSimpleAlias`

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

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

### Methods inherited from interface org.apache.solr.client.solrj.impl.ClusterStateProvider

`getClusterProperty, isRoutedAlias`

## Constructor Details

### HttpClusterStateProvider

public HttpClusterStateProvider(List<String> solrUrls, C httpClient) throws Exception
Provide the solr urls and a solr http client for this cluster state provider to use. It is the caller's responsibility to close the client.

Parameters:
  `solrUrls` - root path solr urls
  `httpClient` - an instance of HttpSolrClientBase
Throws:
  `Exception` - if a problem with initialization occurs

## Method Details

### close

public void close() throws IOException

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

### getSolrClient

protected C getSolrClient(String baseUrl)
Description copied from class: `BaseHttpClusterStateProvider`
Create a SolrClient implementation that uses the specified Solr node URL

Specified by:
  `getSolrClient` in class `BaseHttpClusterStateProvider`

### getHttpClient

public C getHttpClient()