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`, `org.noggit.JSONWriter.Writable`

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
Modifier and Type
Field
Description
`final String`
`asString`
`final Boolean`
`isLeader`
`final String`
`replica`
`final Replica.State`
`state`
`final int`
`version`

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

`EMPTY`

## Constructor Summary

Constructors
Constructor
Description
`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

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`PerReplicaStates.State`
`getDuplicate()`
`int`
`hashCode()`
`static PerReplicaStates.State`
`parse(String serialized)`
`String`
`toString()`
`void`
`writeMap(MapWriter.EntryWriter ew)`
Writes this object's entries out to `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, write`

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

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

## Field Details

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

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

### parse

public static PerReplicaStates.State parse(String serialized)

### writeMap

public void writeMap(MapWriter.EntryWriter ew) throws IOException
Description copied from interface: `MapWriter`
Writes this object's entries out to `ew`.

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()