Class SnapshotNodeStateProvider
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.sim.SnapshotNodeStateProvider
-
- All Implemented Interfaces:
Closeable,AutoCloseable,NodeStateProvider,SolrCloseable
public class SnapshotNodeStateProvider extends Object implements NodeStateProvider
Read-only snapshot of anotherNodeStateProvider.
-
-
Constructor Summary
Constructors Constructor Description SnapshotNodeStateProvider(Map<String,Object> snapshot)Populate this instance from a previously generated snapshot.SnapshotNodeStateProvider(SolrCloudManager other, AutoScalingConfig config)Populate this instance from another instance ofSolrCloudManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Map<String,Object>getNodeValues(String node, Collection<String> tags)ReplicaInfogetReplicaInfo(String collection, String coreNode)Map<String,Map<String,List<ReplicaInfo>>>getReplicaInfo(String node, Collection<String> keys)Map<String,Object>getSnapshot()Create a snapshot of all node and replica tag values available from the original source, per the original autoscaling configuration.-
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.common.SolrCloseable
isClosed
-
-
-
-
Constructor Detail
-
SnapshotNodeStateProvider
public SnapshotNodeStateProvider(SolrCloudManager other, AutoScalingConfig config) throws Exception
Populate this instance from another instance ofSolrCloudManager.- Parameters:
other- another instanceconfig- optionalAutoScalingConfig, which will be used to determine what node and replica tags to retrieve. If this is null then the other instance's config will be used.- Throws:
Exception
-
-
Method Detail
-
getSnapshot
public Map<String,Object> getSnapshot()
Create a snapshot of all node and replica tag values available from the original source, per the original autoscaling configuration. Note:
-
getNodeValues
public Map<String,Object> getNodeValues(String node, Collection<String> tags)
- Specified by:
getNodeValuesin interfaceNodeStateProvider
-
getReplicaInfo
public Map<String,Map<String,List<ReplicaInfo>>> getReplicaInfo(String node, Collection<String> keys)
- Specified by:
getReplicaInfoin interfaceNodeStateProvider
-
getReplicaInfo
public ReplicaInfo getReplicaInfo(String collection, String coreNode)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-