HdfsServerConstants.ReplicaState (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common, interface: HdfsServerConstants, enum: ReplicaState

Package org.apache.hadoop.hdfs.server.common

# Enum Class HdfsServerConstants.ReplicaState

java.lang.Object
java.lang.Enum<HdfsServerConstants.ReplicaState>
org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState

All Implemented Interfaces:
  `Serializable`, `Comparable<HdfsServerConstants.ReplicaState>`, `Constable`

Enclosing interface:
  org.apache.hadoop.hdfs.server.common.HdfsServerConstants

public static enum HdfsServerConstants.ReplicaState extends Enum<HdfsServerConstants.ReplicaState>
Block replica states, which it can go through while being constructed.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `FINALIZED`
  Replica is finalized.
  `RBW`
  Replica is being written to.
  `RUR`
  Replica is under recovery.
  `RWR`
  Replica is waiting to be recovered.
  `TEMPORARY`
  Temporary replica: created for replication and relocation only.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static HdfsServerConstants.ReplicaState`
  `getState(int v)`
  Retrieve ReplicaState corresponding to given index.
  `int`
  `getValue()`
  `static HdfsServerConstants.ReplicaState`
  `read(DataInput in)`
  Retrieve ReplicaState corresponding to index provided in binary stream.
  `static HdfsServerConstants.ReplicaState`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static HdfsServerConstants.ReplicaState[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.
  `void`
  `write(DataOutput out)`
  Write to out

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### FINALIZED

    public static final HdfsServerConstants.ReplicaState FINALIZED
    Replica is finalized. The state when replica is not modified.

  - ### RBW

    public static final HdfsServerConstants.ReplicaState RBW
    Replica is being written to.

  - ### RWR

    public static final HdfsServerConstants.ReplicaState RWR
    Replica is waiting to be recovered.

  - ### RUR

    public static final HdfsServerConstants.ReplicaState RUR
    Replica is under recovery.

  - ### TEMPORARY

    public static final HdfsServerConstants.ReplicaState TEMPORARY
    Temporary replica: created for replication and relocation only.

- ## Method Details

  - ### values

    public static HdfsServerConstants.ReplicaState[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static HdfsServerConstants.ReplicaState valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getValue

    public int getValue()

  - ### getState

    public static HdfsServerConstants.ReplicaState getState(int v)
    Retrieve ReplicaState corresponding to given index.
    Parameters:
      `v` - Index to retrieve `HdfsServerConstants.ReplicaState`.
    Returns:
      `HdfsServerConstants.ReplicaState` object.
    Throws:
      `IndexOutOfBoundsException` - if the index is invalid.

  - ### read

    public static HdfsServerConstants.ReplicaState read(DataInput in) throws IOException
    Retrieve ReplicaState corresponding to index provided in binary stream.
    Parameters:
      `in` - Index value provided as bytes in given binary stream.
    Returns:
      `HdfsServerConstants.ReplicaState` object.
    Throws:
      `IOException` - if an I/O error occurs while reading bytes.
      `IndexOutOfBoundsException` - if the index is invalid.

  - ### write

    public void write(DataOutput out) throws IOException
    Write to out
    Throws:
      `IOException`