org.apache.solr.client.solrj.cloud.autoscaling

## Class Row

- java.lang.Object
- - org.apache.solr.client.solrj.cloud.autoscaling.Row

All Implemented Interfaces:
  MapSerializable, MapWriter

    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
`Map<String,Map<String,List<ReplicaInfo>>>` `collectionVsShardVsReplicas`
`String` `node`

### Constructor Summary

Constructors
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)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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)`

### 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.MapWriter

`jsonStr, toMap`

### Field Detail

#### node

    public final String node

#### collectionVsShardVsReplicas

    public Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas

### Constructor Detail

#### Row

    public Row(String node,
               List<Pair<String,Suggestion.ConditionType>> params,
               List<String> perReplicaAttributes,
               Policy.Session session)

#### Row

    public Row(String node,
               Cell[] cells,
               boolean anyValueMissing,
               Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas,
               boolean isLive,
               Policy.Session session)

### Method Detail

#### writeMap

    public void writeMap(MapWriter.EntryWriter ew)
                  throws IOException

Specified by:
  `writeMap` in interface `MapWriter`
Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### addReplica

    public Row addReplica(String coll,
                          String shard,
                          Replica.Type type)

this simulates adding a replica of a certain coll+shard to node. as a result of adding a replica , values of certain attributes will be modified, in this node as well as other nodes. Please note that the state of the current session is kept intact while this operation is being performed

Parameters:
  `coll` - collection name
  `shard` - shard name
  `type` - replica type

#### getReplica

    public ReplicaInfo getReplica(String coll,
                                  String shard,
                                  Replica.Type type)

#### removeReplica

    public Pair<Row,ReplicaInfo> removeReplica(String coll,
                                               String shard,
                                               Replica.Type type)

#### getCells

    public Cell[] getCells()

#### forEachReplica

    public void forEachReplica(Consumer<ReplicaInfo> consumer)

#### forEachReplica

    public static void forEachReplica(Map<String,Map<String,List<ReplicaInfo>>> collectionVsShardVsReplicas,
                                      Consumer<ReplicaInfo> consumer)