Enum CheckAndSetCompatibility
- java.lang.Object
-
- java.lang.Enum<CheckAndSetCompatibility>
-
- com.palantir.atlasdb.keyvalue.api.CheckAndSetCompatibility
-
- All Implemented Interfaces:
Serializable
,Comparable<CheckAndSetCompatibility>
public enum CheckAndSetCompatibility extends Enum<CheckAndSetCompatibility>
Indicates whether aKeyValueService
supports check and set (CAS) and put unless exists (PUE) operations, and if so the granularity with which it can provide feedback.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOT_SUPPORTED
SUPPORTED_DETAIL_ON_FAILURE
TheKeyValueService
supports CAS and PUE operations.SUPPORTED_NO_DETAIL_ON_FAILURE
TheKeyValueService
supports CAS and PUE operations.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CheckAndSetCompatibility
min(java.util.stream.Stream<CheckAndSetCompatibility> compatibilities)
static CheckAndSetCompatibility
valueOf(String name)
Returns the enum constant of this type with the specified name.static CheckAndSetCompatibility[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_SUPPORTED
public static final CheckAndSetCompatibility NOT_SUPPORTED
-
SUPPORTED_NO_DETAIL_ON_FAILURE
public static final CheckAndSetCompatibility SUPPORTED_NO_DETAIL_ON_FAILURE
TheKeyValueService
supports CAS and PUE operations. However, in the event of failure, there are no guarantees thatCheckAndSetException.getActualValues()
orKeyAlreadyExistsException.getExistingKeys()
actually return any meaningful data (other than the fact that the operation failed).
-
SUPPORTED_DETAIL_ON_FAILURE
public static final CheckAndSetCompatibility SUPPORTED_DETAIL_ON_FAILURE
TheKeyValueService
supports CAS and PUE operations. In the event of failure: - CAS:CheckAndSetException.getActualValues()
on any such exception thrown must return the list of existing values. (In practice, this should have zero or one elements.) - PUE:KeyAlreadyExistsException.getExistingKeys()
on any such exception thrown must return the list of all pre-existing cells for any row which the implementation attempted to put into the key value service. Note that there is no guarantee that the implementation attempts to put all rows atomically.
-
-
Method Detail
-
values
public static CheckAndSetCompatibility[] 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 (CheckAndSetCompatibility c : CheckAndSetCompatibility.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CheckAndSetCompatibility 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
-
min
public static CheckAndSetCompatibility min(java.util.stream.Stream<CheckAndSetCompatibility> compatibilities)
-
-