Enum EntityOwnershipChangeState
- java.lang.Object
-
- java.lang.Enum<EntityOwnershipChangeState>
-
- org.opendaylight.mdsal.eos.common.api.EntityOwnershipChangeState
-
- All Implemented Interfaces:
Serializable
,Comparable<EntityOwnershipChangeState>
public enum EntityOwnershipChangeState extends Enum<EntityOwnershipChangeState>
Enumerates the ownership change states for an entity.- Author:
- Thomas Pantelis
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LOCAL_OWNERSHIP_GRANTED
The local process instance has been granted ownership.LOCAL_OWNERSHIP_LOST_NEW_OWNER
The local process instance has lost ownership and another process instance is now the owner.LOCAL_OWNERSHIP_LOST_NO_OWNER
The local process instance has lost ownership and there are no longer any candidates for the entity and thus has no owner.LOCAL_OWNERSHIP_RETAINED_WITH_NO_CHANGE
The local process instance ownership has not changed but some other aspect has changed (for example inJeopardy).REMOTE_OWNERSHIP_CHANGED
Entity ownership has transitioned to another process instance and this instance was not the previous owner.REMOTE_OWNERSHIP_LOST_NO_OWNER
A remote process instance has lost ownership and there are no longer any candidates for the entity and thus has no owner.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EntityOwnershipChangeState
from(boolean wasOwner, boolean isOwner, boolean hasOwner)
boolean
hasOwner()
Returns the current ownership status of the entity across all process instances.boolean
isOwner()
Returns the current ownership status of the entity for this process instance.String
toString()
static EntityOwnershipChangeState
valueOf(String name)
Returns the enum constant of this type with the specified name.static EntityOwnershipChangeState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.boolean
wasOwner()
Returns the previous ownership status of the entity for this process instance.
-
-
-
Enum Constant Detail
-
LOCAL_OWNERSHIP_GRANTED
public static final EntityOwnershipChangeState LOCAL_OWNERSHIP_GRANTED
The local process instance has been granted ownership.
-
LOCAL_OWNERSHIP_LOST_NEW_OWNER
public static final EntityOwnershipChangeState LOCAL_OWNERSHIP_LOST_NEW_OWNER
The local process instance has lost ownership and another process instance is now the owner.
-
LOCAL_OWNERSHIP_LOST_NO_OWNER
public static final EntityOwnershipChangeState LOCAL_OWNERSHIP_LOST_NO_OWNER
The local process instance has lost ownership and there are no longer any candidates for the entity and thus has no owner.
-
LOCAL_OWNERSHIP_RETAINED_WITH_NO_CHANGE
public static final EntityOwnershipChangeState LOCAL_OWNERSHIP_RETAINED_WITH_NO_CHANGE
The local process instance ownership has not changed but some other aspect has changed (for example inJeopardy).
-
REMOTE_OWNERSHIP_CHANGED
public static final EntityOwnershipChangeState REMOTE_OWNERSHIP_CHANGED
Entity ownership has transitioned to another process instance and this instance was not the previous owner.
-
REMOTE_OWNERSHIP_LOST_NO_OWNER
public static final EntityOwnershipChangeState REMOTE_OWNERSHIP_LOST_NO_OWNER
A remote process instance has lost ownership and there are no longer any candidates for the entity and thus has no owner.
-
-
Method Detail
-
values
public static EntityOwnershipChangeState[] 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 (EntityOwnershipChangeState c : EntityOwnershipChangeState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityOwnershipChangeState 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
-
wasOwner
public boolean wasOwner()
Returns the previous ownership status of the entity for this process instance.- Returns:
- true if this process was the owner of the entity at the time this notification was generated
-
isOwner
public boolean isOwner()
Returns the current ownership status of the entity for this process instance.- Returns:
- true if this process is now the owner of the entity
-
hasOwner
public boolean hasOwner()
Returns the current ownership status of the entity across all process instances.- Returns:
- true if the entity has an owner which may or may not be this process. If false, then the entity has no candidates and thus no owner.
-
toString
public String toString()
- Overrides:
toString
in classEnum<EntityOwnershipChangeState>
-
from
public static EntityOwnershipChangeState from(boolean wasOwner, boolean isOwner, boolean hasOwner)
-
-