Class DelegatingClusterStateProvider
java.lang.Object
org.apache.solr.client.solrj.impl.DelegatingClusterStateProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,ClusterStateProvider,SolrCloseable
Base class for overriding some behavior of
ClusterStateProvider-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnect()getAliasProperties(String alias) Return alias properties, or an empty map if the alias has no properties.Obtain cluster properties.getClusterProperty(String propertyName) Obtain a cluster property, or null if it doesn't exist.Obtain the current cluster state.getCollection(String name) Obtain set of live_nodes for the cluster.Get the collection-specific policyObtain the state of the collection (cluster status).resolveAlias(String alias) Given a collection alias, returns a list of collections it points to, or returns a singleton list of the input if it's not an alias.resolveSimpleAlias(String alias) Given a collection alias, return a single collection it points to, or the original name if it's not an alias.Methods 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, isRoutedAliasMethods inherited from interface org.apache.solr.common.SolrCloseable
isClosed
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingClusterStateProvider
-
-
Method Details
-
getState
Description copied from interface:ClusterStateProviderObtain the state of the collection (cluster status).- Specified by:
getStatein interfaceClusterStateProvider- Returns:
- the collection state, or null only if collection doesn't exist
-
getLiveNodes
Description copied from interface:ClusterStateProviderObtain set of live_nodes for the cluster.- Specified by:
getLiveNodesin interfaceClusterStateProvider
-
resolveAlias
Description copied from interface:ClusterStateProviderGiven a collection alias, returns a list of collections it points to, or returns a singleton list of the input if it's not an alias.- Specified by:
resolveAliasin interfaceClusterStateProvider
-
getAliasProperties
Description copied from interface:ClusterStateProviderReturn alias properties, or an empty map if the alias has no properties.- Specified by:
getAliasPropertiesin interfaceClusterStateProvider
-
resolveSimpleAlias
Description copied from interface:ClusterStateProviderGiven a collection alias, return a single collection it points to, or the original name if it's not an alias.- Specified by:
resolveSimpleAliasin interfaceClusterStateProvider- Throws:
IllegalArgumentException- if an alias points to more than 1 collection, either directly or indirectly.
-
getClusterProperty
Description copied from interface:ClusterStateProviderObtain a cluster property, or null if it doesn't exist.- Specified by:
getClusterPropertyin interfaceClusterStateProvider
-
getClusterState
Description copied from interface:ClusterStateProviderObtain the current cluster state. WARNING: This method is quite expensive as it involves fetching remote information. Use with caution and be aware of the potential performance implications.- Specified by:
getClusterStatein interfaceClusterStateProvider
-
getClusterProperties
Description copied from interface:ClusterStateProviderObtain cluster properties.- Specified by:
getClusterPropertiesin interfaceClusterStateProvider- Returns:
- configured cluster properties, or an empty map, never null.
-
getPolicyNameByCollection
Description copied from interface:ClusterStateProviderGet the collection-specific policy- Specified by:
getPolicyNameByCollectionin interfaceClusterStateProvider
-
getCollection
- Specified by:
getCollectionin interfaceClusterStateProvider- Throws:
IOException
-
connect
public void connect()- Specified by:
connectin interfaceClusterStateProvider
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getQuorumHosts
- Specified by:
getQuorumHostsin interfaceClusterStateProvider
-