Class SnapshotClusterStateProvider
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.sim.SnapshotClusterStateProvider
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ClusterStateProvider
,SolrCloseable
public class SnapshotClusterStateProvider extends Object implements ClusterStateProvider
Read-only snapshot of anotherClusterStateProvider
.
-
-
Constructor Summary
Constructors Constructor Description SnapshotClusterStateProvider(Map<String,Object> snapshot)
SnapshotClusterStateProvider(ClusterStateProvider other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
connect()
Map<String,String>
getAliasProperties(String alias)
Map<String,Object>
getClusterProperties()
ClusterState
getClusterState()
Set<String>
getLiveNodes()
String
getPolicyNameByCollection(String coll)
Map<String,Object>
getSnapshot()
ClusterState.CollectionRef
getState(String collection)
List<String>
resolveAlias(String alias)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.client.solrj.impl.ClusterStateProvider
getClusterProperty, getClusterProperty, getCollection, isRoutedAlias, resolveSimpleAlias
-
Methods inherited from interface org.apache.solr.common.SolrCloseable
isClosed
-
-
-
-
Method Detail
-
getState
public ClusterState.CollectionRef getState(String collection)
- Specified by:
getState
in interfaceClusterStateProvider
-
getLiveNodes
public Set<String> getLiveNodes()
- Specified by:
getLiveNodes
in interfaceClusterStateProvider
-
resolveAlias
public List<String> resolveAlias(String alias)
- Specified by:
resolveAlias
in interfaceClusterStateProvider
-
getAliasProperties
public Map<String,String> getAliasProperties(String alias)
- Specified by:
getAliasProperties
in interfaceClusterStateProvider
-
getClusterState
public ClusterState getClusterState() throws IOException
- Specified by:
getClusterState
in interfaceClusterStateProvider
- Throws:
IOException
-
getClusterProperties
public Map<String,Object> getClusterProperties()
- Specified by:
getClusterProperties
in interfaceClusterStateProvider
-
getPolicyNameByCollection
public String getPolicyNameByCollection(String coll)
- Specified by:
getPolicyNameByCollection
in interfaceClusterStateProvider
-
connect
public void connect()
- Specified by:
connect
in interfaceClusterStateProvider
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-