public class HttpClusterStateProvider extends Object implements ClusterStateProvider
Constructor and Description |
---|
HttpClusterStateProvider(List<String> solrUrls,
org.apache.http.client.HttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect() |
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
|
ClusterState.CollectionRef |
getState(String collection)
Obtain the state of the collection (cluster status).
|
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.
|
void |
setCacheTimeout(int cacheTimeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClusterProperty, getCollection
isClosed
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public ClusterState.CollectionRef getState(String collection)
ClusterStateProvider
getState
in interface ClusterStateProvider
public Set<String> getLiveNodes()
ClusterStateProvider
getLiveNodes
in interface ClusterStateProvider
public List<String> resolveAlias(String aliasName)
ClusterStateProvider
resolveAlias
in interface ClusterStateProvider
public ClusterState getClusterState() throws IOException
ClusterStateProvider
getClusterState
in interface ClusterStateProvider
IOException
public Map<String,Object> getClusterProperties()
ClusterStateProvider
getClusterProperties
in interface ClusterStateProvider
public String getPolicyNameByCollection(String coll)
ClusterStateProvider
getPolicyNameByCollection
in interface ClusterStateProvider
public Object getClusterProperty(String propertyName)
ClusterStateProvider
getClusterProperty
in interface ClusterStateProvider
public void connect()
connect
in interface ClusterStateProvider
public int getCacheTimeout()
public void setCacheTimeout(int cacheTimeout)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.