Package com.tailf.ha
Enum Class HaStateType
- All Implemented Interfaces:
Serializable
,Comparable<HaStateType>
,Constable
This enum describes the different states a HA node can be in.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionNONE implies that the node is not participating in a HA cluster.PRIMARY implies that the node is primary in a HA cluster.SECONDARY implies that the node is secondary in a HA cluster.SECONDARY_RELAY implies that the node is secondary in a HA cluster, that may also have "sub-secondaries" (after a beRelay() call). -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the integer value represented by this enum value.static HaStateType
valueOf
(int i) Instantiates an HaStateType from an integer value.static HaStateType
Returns the enum constant of this class with the specified name.static HaStateType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NONE
NONE implies that the node is not participating in a HA cluster. -
SECONDARY
SECONDARY implies that the node is secondary in a HA cluster. -
PRIMARY
PRIMARY implies that the node is primary in a HA cluster. -
SECONDARY_RELAY
SECONDARY_RELAY implies that the node is secondary in a HA cluster, that may also have "sub-secondaries" (after a beRelay() call).
-
-
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
-
getValue
public int getValue()Get the integer value represented by this enum value.- Returns:
- integer value for enum
-
valueOf
Instantiates an HaStateType from an integer value.- Parameters:
i
- - integer value representing the HaStateType- Returns:
- an HaStateType object
-