public interface ClusterStateProvider extends SolrCloseable
Modifier and Type | Method and Description |
---|---|
void |
connect() |
Map<String,String> |
getAliasProperties(String alias)
Return alias properties, or an empty map if the alias has no properties.
|
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 policy
|
ClusterState.CollectionRef |
getState(String collection)
Obtain the state of the collection (cluster status).
|
default boolean |
isRoutedAlias(String alias)
Returns true if an alias exists and is a routed alias, false otherwise.
|
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.
|
default String |
resolveSimpleAlias(String alias)
Given a collection alias, return a single collection it points to, or the original name if it's not an
alias.
|
isClosed
ClusterState.CollectionRef getState(String collection)
List<String> resolveAlias(String alias)
Map<String,String> getAliasProperties(String alias)
default String resolveSimpleAlias(String alias) throws IllegalArgumentException
IllegalArgumentException
- if an alias points to more than 1 collection, either directly or indirectly.default boolean isRoutedAlias(String alias)
ClusterState getClusterState() throws IOException
IOException
default DocCollection getCollection(String name) throws IOException
IOException
Map<String,Object> getClusterProperties()
default <T> T getClusterProperty(String key, T defaultValue)
default <T> T getClusterProperty(String propertyName)
String getPolicyNameByCollection(String coll)
void connect()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.