public static SyncReplicationState valueOf(int value) {
    switch (value) {
      case 0:
        return NONE;
      case 1:
        return ACTIVE;
      case 2:
        return DOWNGRADE_ACTIVE;
      case 3:
        return STANDBY;
      default:
        throw new IllegalArgumentException("Unknown synchronous replication state " + value);
    }
  }
Used by synchronous replication. Indicate the state of the current cluster in a synchronous
replication peer. The state may be one of {@link SyncReplicationState#ACTIVE},
{@link SyncReplicationState#DOWNGRADE_ACTIVE} or {@link SyncReplicationState#STANDBY}.
<p>
For asynchronous replication, the state is {@link SyncReplicationState#NONE}.
hbase-client/src/main/java/org/apache/hadoop/hbase/replication/SyncReplicationState.java