public abstract class BaseHttpClusterStateProvider extends Object implements ClusterStateProvider
| Constructor and Description |
|---|
BaseHttpClusterStateProvider() |
| 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.
|
int |
getCacheTimeout() |
Map<String,Object> |
getClusterProperties()
Obtain cluster properties.
|
Object |
getClusterProperty(String propertyName)
Obtain a cluster property, or null if it doesn't exist.
|
ClusterState |
getClusterState()
Obtain the current cluster state.
|
Set<String> |
getLiveNodes()
Obtain set of live_nodes for the cluster.
|
String |
getPolicyNameByCollection(String coll)
Get the collection-specific policy
|
protected abstract SolrClient |
getSolrClient(String baseUrl) |
ClusterState.CollectionRef |
getState(String collection)
Obtain the state of the collection (cluster status).
|
void |
init(List<String> solrUrls) |
List<String> |
resolveAlias(String aliasName)
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.
|
List<String> |
resolveAlias(String aliasName,
boolean forceFetch) |
String |
resolveSimpleAlias(String aliasName)
Given a collection alias, return a single collection it points to, or the original name if it's not an
alias.
|
void |
setCacheTimeout(int cacheTimeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClusterProperty, getCollection, isRoutedAliasisClosedprotected abstract SolrClient getSolrClient(String baseUrl)
public ClusterState.CollectionRef getState(String collection)
ClusterStateProvidergetState in interface ClusterStateProviderpublic Set<String> getLiveNodes()
ClusterStateProvidergetLiveNodes in interface ClusterStateProviderpublic List<String> resolveAlias(String aliasName)
ClusterStateProviderresolveAlias in interface ClusterStateProviderpublic String resolveSimpleAlias(String aliasName) throws IllegalArgumentException
ClusterStateProviderresolveSimpleAlias in interface ClusterStateProviderIllegalArgumentException - if an alias points to more than 1 collection, either directly or indirectly.public Map<String,String> getAliasProperties(String alias)
ClusterStateProvidergetAliasProperties in interface ClusterStateProviderpublic ClusterState getClusterState() throws IOException
ClusterStateProvidergetClusterState in interface ClusterStateProviderIOExceptionpublic Map<String,Object> getClusterProperties()
ClusterStateProvidergetClusterProperties in interface ClusterStateProviderpublic String getPolicyNameByCollection(String coll)
ClusterStateProvidergetPolicyNameByCollection in interface ClusterStateProviderpublic Object getClusterProperty(String propertyName)
ClusterStateProvidergetClusterProperty in interface ClusterStateProviderpublic void connect()
connect in interface ClusterStateProviderpublic int getCacheTimeout()
public void setCacheTimeout(int cacheTimeout)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.