Package org.onosproject.mastership
Enum MastershipEvent.Type
- java.lang.Object
-
- java.lang.Enum<MastershipEvent.Type>
-
- org.onosproject.mastership.MastershipEvent.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<MastershipEvent.Type>
- Enclosing class:
- MastershipEvent
public static enum MastershipEvent.Type extends Enum<MastershipEvent.Type>
Type of mastership events.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BACKUPS_CHANGED
Signifies that the list of backup nodes has changed.MASTER_CHANGED
Signifies that the master for a device has changed.RESTORED
Signifies that the underlying storage for the Mastership state of this device became available again.SUSPENDED
Signifies that the underlying storage for the Mastership state of this device is unavailable.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MastershipEvent.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static MastershipEvent.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MASTER_CHANGED
public static final MastershipEvent.Type MASTER_CHANGED
Signifies that the master for a device has changed.
-
BACKUPS_CHANGED
public static final MastershipEvent.Type BACKUPS_CHANGED
Signifies that the list of backup nodes has changed. If the change in the backups list is accompanied by a change in master, the event is subsumed by MASTER_CHANGED.
-
SUSPENDED
public static final MastershipEvent.Type SUSPENDED
Signifies that the underlying storage for the Mastership state of this device is unavailable.
-
RESTORED
public static final MastershipEvent.Type RESTORED
Signifies that the underlying storage for the Mastership state of this device became available again.
-
-
Method Detail
-
values
public static MastershipEvent.Type[] 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 (MastershipEvent.Type c : MastershipEvent.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MastershipEvent.Type 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
-
-