Package org.onosproject.cluster
Enum ControllerNode.State
- java.lang.Object
-
- java.lang.Enum<ControllerNode.State>
-
- org.onosproject.cluster.ControllerNode.State
-
- All Implemented Interfaces:
Serializable
,Comparable<ControllerNode.State>
- Enclosing interface:
- ControllerNode
public static enum ControllerNode.State extends Enum<ControllerNode.State>
Represents the operational state of the instance.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVE
Signifies that the instance is active and operating normally.INACTIVE
Signifies that the instance is inactive, which means either down or up, but not operational.READY
Signifies that the instance is active and that all components are operating normally.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isActive()
Indicates whether the state represents node which is active or ready.boolean
isReady()
Indicates whether the state represents a node which is ready.static ControllerNode.State
valueOf(String name)
Returns the enum constant of this type with the specified name.static ControllerNode.State[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READY
public static final ControllerNode.State READY
Signifies that the instance is active and that all components are operating normally.
-
ACTIVE
public static final ControllerNode.State ACTIVE
Signifies that the instance is active and operating normally.
-
INACTIVE
public static final ControllerNode.State INACTIVE
Signifies that the instance is inactive, which means either down or up, but not operational.
-
-
Method Detail
-
values
public static ControllerNode.State[] 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 (ControllerNode.State c : ControllerNode.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ControllerNode.State 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 nameNullPointerException
- if the argument is null
-
isActive
public boolean isActive()
Indicates whether the state represents node which is active or ready.- Returns:
- true if active or ready
-
isReady
public boolean isReady()
Indicates whether the state represents a node which is ready.- Returns:
- true if active and ready
-
-