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() |
String |
getAlias(String alias)
Given an alias, returns the collection name that this alias points to
|
int |
getCacheTimeout() |
Object |
getClusterProperty(String propertyName)
Obtain a cluster property, or null if it doesn't exist.
|
Object |
getClusterProperty(String propertyName,
String def)
Obtain a cluster property, or the default value if it doesn't exist.
|
String |
getCollectionName(String name)
Given a name, returns the collection name if an alias by that name exists, or
returns the name itself, if no alias exists.
|
ClusterState.CollectionRef |
getState(String collection)
Obtain the state of the collection (cluster status).
|
Set<String> |
liveNodes()
Obtain set of live_nodes for the cluster.
|
void |
setCacheTimeout(int cacheTimeout) |
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> liveNodes()
ClusterStateProvider
liveNodes
in interface ClusterStateProvider
public String getAlias(String alias)
ClusterStateProvider
getAlias
in interface ClusterStateProvider
public String getCollectionName(String name)
ClusterStateProvider
getCollectionName
in interface ClusterStateProvider
public Object getClusterProperty(String propertyName)
ClusterStateProvider
getClusterProperty
in interface ClusterStateProvider
public Object getClusterProperty(String propertyName, String def)
ClusterStateProvider
getClusterProperty
in interface ClusterStateProvider
public void connect()
connect
in interface ClusterStateProvider
public int getCacheTimeout()
public void setCacheTimeout(int cacheTimeout)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.