Enum Class SyncReplicationState
- All Implemented Interfaces:
Serializable
,Comparable<SyncReplicationState>
,Constable
Used by synchronous replication. Indicate the state of the current cluster in a synchronous
replication peer. The state may be one of
ACTIVE
,
DOWNGRADE_ACTIVE
or STANDBY
.
For asynchronous replication, the state is NONE
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SyncReplicationState
parseFrom
(byte[] bytes) parseStateAndNewStateFrom
(byte[] bytes) static byte[]
toByteArray
(SyncReplicationState state) static byte[]
toByteArray
(SyncReplicationState state, SyncReplicationState newState) int
value()
static SyncReplicationState
valueOf
(int value) Returns the enum constant of this class with the specified name.static SyncReplicationState
Returns the enum constant of this class with the specified name.static SyncReplicationState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
ACTIVE
-
DOWNGRADE_ACTIVE
-
STANDBY
-
-
Field Details
-
value
-
-
Constructor Details
-
SyncReplicationState
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
valueOf
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:
value
- 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 nameNullPointerException
- if the argument is null
-
value
-
toByteArray
-
parseFrom
public static SyncReplicationState parseFrom(byte[] bytes) throws org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException - Throws:
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException
-
toByteArray
-
parseStateAndNewStateFrom
public static Pair<SyncReplicationState,SyncReplicationState> parseStateAndNewStateFrom(byte[] bytes) throws IOException - Throws:
IOException
-