Package org.onosproject.store.primitives
Enum MapUpdate.Type
- java.lang.Object
-
- java.lang.Enum<MapUpdate.Type>
-
- org.onosproject.store.primitives.MapUpdate.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MapUpdate.Type>
public static enum MapUpdate.Type extends java.lang.Enum<MapUpdate.Type>
Type of database update operation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LOCK
Acquires a read lock on a key.PUT_IF_VERSION_MATCH
Updates an entry if the current version matches specified version.REMOVE_IF_VERSION_MATCH
Removes an entry if the current version matches specified version.VERSION_MATCH
Checks the version of a key without locking the key.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapUpdate.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MapUpdate.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOCK
public static final MapUpdate.Type LOCK
Acquires a read lock on a key.This record type will check to ensure that the lock version matches the current version for the key in the map and acquire a read lock on the key for the duration of the transaction.
-
VERSION_MATCH
public static final MapUpdate.Type VERSION_MATCH
Checks the version of a key without locking the key.This record type will perform a simple version check during the prepare phase of the two-phase commit protocol to ensure that the key has not changed during a transaction.
-
PUT_IF_VERSION_MATCH
public static final MapUpdate.Type PUT_IF_VERSION_MATCH
Updates an entry if the current version matches specified version.
-
REMOVE_IF_VERSION_MATCH
public static final MapUpdate.Type REMOVE_IF_VERSION_MATCH
Removes an entry if the current version matches specified version.
-
-
Method Detail
-
values
public static MapUpdate.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 (MapUpdate.Type c : MapUpdate.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 MapUpdate.Type 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
-
-