Interface ClusterStateProvider
-
- All Superinterfaces:
AutoCloseable
,Closeable
,SolrCloseable
- All Known Implementing Classes:
DelegatingClusterStateProvider
,HttpClusterStateProvider
,ZkClientClusterStateProvider
public interface ClusterStateProvider extends SolrCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
connect()
Map<String,Object>
getClusterProperties()
Obtain cluster properties.default <T> T
getClusterProperty(String propertyName)
Obtain a cluster property, or null if it doesn't exist.default <T> T
getClusterProperty(String key, T defaultValue)
Obtain a cluster property, or the default value if it doesn't exist.ClusterState
getClusterState()
Obtain the current cluster state.default DocCollection
getCollection(String name)
Set<String>
getLiveNodes()
Obtain set of live_nodes for the cluster.String
getPolicyNameByCollection(String coll)
Get the collection-specific policyClusterState.CollectionRef
getState(String collection)
Obtain the state of the collection (cluster status).List<String>
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.-
Methods inherited from interface org.apache.solr.common.SolrCloseable
isClosed
-
-
-
-
Method Detail
-
getState
ClusterState.CollectionRef getState(String collection)
Obtain the state of the collection (cluster status).- Returns:
- the collection state, or null is collection doesn't exist
-
resolveAlias
List<String> 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.
-
getClusterState
ClusterState getClusterState() throws IOException
Obtain the current cluster state.- Throws:
IOException
-
getCollection
default DocCollection getCollection(String name) throws IOException
- Throws:
IOException
-
getClusterProperties
Map<String,Object> getClusterProperties()
Obtain cluster properties.- Returns:
- configured cluster properties, or an empty map, never null.
-
getClusterProperty
default <T> T getClusterProperty(String key, T defaultValue)
Obtain a cluster property, or the default value if it doesn't exist.
-
getClusterProperty
default <T> T getClusterProperty(String propertyName)
Obtain a cluster property, or null if it doesn't exist.
-
getPolicyNameByCollection
String getPolicyNameByCollection(String coll)
Get the collection-specific policy
-
connect
void connect()
-
-