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 Closeableclose in interface AutoCloseableIOExceptionpublic ClusterState.CollectionRef getState(String collection)
ClusterStateProvidergetState in interface ClusterStateProviderpublic Set<String> liveNodes()
ClusterStateProviderliveNodes in interface ClusterStateProviderpublic String getAlias(String alias)
ClusterStateProvidergetAlias in interface ClusterStateProviderpublic String getCollectionName(String name)
ClusterStateProvidergetCollectionName in interface ClusterStateProviderpublic Object getClusterProperty(String propertyName)
ClusterStateProvidergetClusterProperty in interface ClusterStateProviderpublic Object getClusterProperty(String propertyName, String def)
ClusterStateProvidergetClusterProperty in interface ClusterStateProviderpublic void connect()
connect in interface ClusterStateProviderpublic int getCacheTimeout()
public void setCacheTimeout(int cacheTimeout)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.