Class Row
- java.lang.Object
-
- org.apache.solr.client.solrj.cloud.autoscaling.Row
-
- All Implemented Interfaces:
MapSerializable
,MapWriter
,NavigableObject
public class Row extends Object implements MapWriter
Each instance represents a node in the cluster
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,org.apache.solr.client.solrj.cloud.autoscaling.Row.CacheEntry>
cacheStats
Map<String,Map<String,List<ReplicaInfo>>>
collectionVsShardVsReplicas
String
node
-
Constructor Summary
Constructors Constructor Description Row(String node, List<Pair<String,Variable.Type>> params, List<String> perReplicaAttributes, Policy.Session session)
Row(String node, Cell[] cells, boolean anyValueMissing, Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas, boolean isLive, Policy.Session session, Map perRowCache, Map globalCache)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
-
-
-
-
Constructor Detail
-
Row
public Row(String node, List<Pair<String,Variable.Type>> params, List<String> perReplicaAttributes, Policy.Session session)
-
-
Method Detail
-
forEachShard
public void forEachShard(String collection, BiConsumer<String,List<ReplicaInfo>> consumer)
-
computeCacheIfAbsent
public <R> R computeCacheIfAbsent(String cacheName, Function<Object,R> supplier)
-
computeCacheIfAbsent
public <R> R computeCacheIfAbsent(String coll, String shard, String cacheName, Object key, Function<Object,R> supplier)
-
writeMap
public void writeMap(MapWriter.EntryWriter ew) throws IOException
- Specified by:
writeMap
in interfaceMapWriter
- Throws:
IOException
-
addReplica
public Row addReplica(String coll, String shard, Replica.Type type)
-
addReplica
public Row addReplica(String coll, String shard, Replica.Type type, boolean strictMode)
-
getReplica
public ReplicaInfo getReplica(String coll, String shard, Replica.Type type)
-
removeReplica
public Row removeReplica(String coll, String shard, Replica.Type type)
-
removeReplica
public Row removeReplica(String coll, String shard, Replica.Type type, int recursionCount)
-
getCells
public Cell[] getCells()
-
isLive
public boolean isLive()
-
forEachReplica
public void forEachReplica(Consumer<ReplicaInfo> consumer)
-
forEachReplica
public void forEachReplica(String coll, Consumer<ReplicaInfo> consumer)
-
forEachReplica
public static void forEachReplica(Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas, Consumer<ReplicaInfo> consumer)
-
-