org.apache.hadoop.ha
Enum HAServiceProtocol.HAServiceState
java.lang.Object
java.lang.Enum<HAServiceProtocol.HAServiceState>
org.apache.hadoop.ha.HAServiceProtocol.HAServiceState
- All Implemented Interfaces:
- Serializable, Comparable<HAServiceProtocol.HAServiceState>
- Enclosing interface:
- HAServiceProtocol
public static enum HAServiceProtocol.HAServiceState
- extends Enum<HAServiceProtocol.HAServiceState>
An HA service may be in active or standby state. During startup, it is in
an unknown INITIALIZING state. During shutdown, it is in the STOPPING state
and can no longer return to active/standby states.
INITIALIZING
public static final HAServiceProtocol.HAServiceState INITIALIZING
ACTIVE
public static final HAServiceProtocol.HAServiceState ACTIVE
STANDBY
public static final HAServiceProtocol.HAServiceState STANDBY
STOPPING
public static final HAServiceProtocol.HAServiceState STOPPING
values
public static HAServiceProtocol.HAServiceState[] 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 (HAServiceProtocol.HAServiceState c : HAServiceProtocol.HAServiceState.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static HAServiceProtocol.HAServiceState valueOf(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:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
toString
public String toString()
- Overrides:
toString
in class Enum<HAServiceProtocol.HAServiceState>
Copyright © 2014 Apache Software Foundation. All Rights Reserved.