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
ConstructorsConstructorDescriptionHttpClusterStateProvider(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 TypeMethodDescriptionvoidclose()protected CgetSolrClient(String baseUrl) Create a SolrClient implementation that uses the specified Solr node URLMethods 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, resolveSimpleAliasMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.client.solrj.impl.ClusterStateProvider
getClusterProperty, isRoutedAlias
-
Constructor Details
-
HttpClusterStateProvider
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 urlshttpClient- an instance of HttpSolrClientBase- Throws:
Exception- if a problem with initialization occurs
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classBaseHttpClusterStateProvider- Throws:
IOException
-
getSolrClient
Description copied from class:BaseHttpClusterStateProviderCreate a SolrClient implementation that uses the specified Solr node URL- Specified by:
getSolrClientin classBaseHttpClusterStateProvider
-
getHttpClient
-