Package com.linkedin.venice.helix
Enum HelixState
- java.lang.Object
-
- java.lang.Enum<HelixState>
-
- com.linkedin.venice.helix.HelixState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HelixState>
public enum HelixState extends java.lang.Enum<HelixState>
States of Venice node in Helix. In order to realize zero-downtime upgrade, we assign an integer value for each of state.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DROPPED_STATE
static java.lang.String
ERROR_STATE
static java.lang.String
LEADER_STATE
static java.lang.String
OFFLINE_STATE
static java.lang.String
STANDBY_STATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getStateValue()
static HelixState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HelixState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFFLINE
public static final HelixState OFFLINE
-
ERROR
public static final HelixState ERROR
-
DROPPED
public static final HelixState DROPPED
-
UNKNOWN
public static final HelixState UNKNOWN
-
LEADER
public static final HelixState LEADER
-
STANDBY
public static final HelixState STANDBY
-
-
Field Detail
-
OFFLINE_STATE
public static final java.lang.String OFFLINE_STATE
- See Also:
- Constant Field Values
-
DROPPED_STATE
public static final java.lang.String DROPPED_STATE
- See Also:
- Constant Field Values
-
ERROR_STATE
public static final java.lang.String ERROR_STATE
- See Also:
- Constant Field Values
-
LEADER_STATE
public static final java.lang.String LEADER_STATE
- See Also:
- Constant Field Values
-
STANDBY_STATE
public static final java.lang.String STANDBY_STATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static HelixState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HelixState c : HelixState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HelixState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getStateValue
public int getStateValue()
-
-