Package org.apache.solr.common.cloud

## Class PerReplicaStates.State

- java.lang.Object
- - org.apache.solr.common.cloud.PerReplicaStates.State

All Implemented Interfaces:
  `MapSerializable`, `MapWriter`, `NavigableObject`

Enclosing class:
  PerReplicaStates

    public static class PerReplicaStates.State
    extends Object
    implements MapWriter

The state of a replica as stored as a node under /collections/collection-name/state.json/replica-state

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

`MapWriter.EntryWriter`

### Field Summary

Fields
`String` `asString`
`Boolean` `isLeader`
`String` `replica`
`Replica.State` `state`
`int` `version`

### Constructor Summary

Constructors
`State​(String replica, Replica.State state, Boolean isLeader, int version)`
`State​(String replica, Replica.State state, Boolean isLeader, int version, PerReplicaStates.State duplicate)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals​(Object o)`
`PerReplicaStates.State` `getDuplicate()`
`int` `hashCode()`
`static PerReplicaStates.State` `parse​(String serialized)`
`String` `toString()`
`void` `writeMap​(MapWriter.EntryWriter ew)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.solr.common.MapWriter

`jsonStr, toMap`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size`

### Field Detail

#### replica

    public final String replica

#### state

    public final Replica.State state

#### isLeader

    public final Boolean isLeader

#### version

    public final int version

#### asString

    public final String asString

### Constructor Detail

#### State

    public State​(String replica,
                 Replica.State state,
                 Boolean isLeader,
                 int version)

#### State

    public State​(String replica,
                 Replica.State state,
                 Boolean isLeader,
                 int version,
                 PerReplicaStates.State duplicate)

### Method Detail

#### parse

    public static PerReplicaStates.State parse​(String serialized)

#### 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`

#### equals

    public boolean equals​(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### getDuplicate

    public PerReplicaStates.State getDuplicate()