public class Row extends Object implements MapWriter
MapWriter.EntryWriter
Modifier and Type | Field and Description |
---|---|
Map<String,Map<String,List<ReplicaInfo>>> |
collectionVsShardVsReplicas |
String |
node |
Constructor and Description |
---|
Row(String node,
Cell[] cells,
boolean anyValueMissing,
Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas,
boolean isLive,
Policy.Session session) |
Row(String node,
List<Pair<String,Suggestion.ConditionType>> params,
List<String> perReplicaAttributes,
Policy.Session session) |
Modifier and Type | Method and Description |
---|---|
Row |
addReplica(String coll,
String shard,
Replica.Type type)
this simulates adding a replica of a certain coll+shard to node.
|
void |
forEachReplica(Consumer<ReplicaInfo> consumer) |
static void |
forEachReplica(Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas,
Consumer<ReplicaInfo> consumer) |
Cell[] |
getCells() |
ReplicaInfo |
getReplica(String coll,
String shard,
Replica.Type type) |
Pair<Row,ReplicaInfo> |
removeReplica(String coll,
String shard,
Replica.Type type) |
String |
toString() |
void |
writeMap(MapWriter.EntryWriter ew) |
public final String node
public Row(String node, List<Pair<String,Suggestion.ConditionType>> params, List<String> perReplicaAttributes, Policy.Session session)
public Row(String node, Cell[] cells, boolean anyValueMissing, Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas, boolean isLive, Policy.Session session)
public void writeMap(MapWriter.EntryWriter ew) throws IOException
writeMap
in interface MapWriter
IOException
public Row addReplica(String coll, String shard, Replica.Type type)
coll
- collection nameshard
- shard nametype
- replica typepublic ReplicaInfo getReplica(String coll, String shard, Replica.Type type)
public Pair<Row,ReplicaInfo> removeReplica(String coll, String shard, Replica.Type type)
public Cell[] getCells()
public void forEachReplica(Consumer<ReplicaInfo> consumer)
public static void forEachReplica(Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas, Consumer<ReplicaInfo> consumer)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.