Package net.spy.memcached
Enum Class CASResponse
- All Implemented Interfaces:
Serializable
,Comparable<CASResponse>
,Constable
Response codes for a CAS operation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStatus indicating the value was found in the cache, but exists with a different CAS value than expected.Status indicating the value was not found in the cache (an add operation may be issued to store the value).Status indicating there was an error in specifying the arguments for the Observe.Status indicating the CAS operation succeeded but the value was subsequently modified during Observe.Status indicating there was a Timeout in the Observe operation.Status indicating that the CAS was successful and the new value is stored in the cache. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CASResponse
Returns the enum constant of this class with the specified name.static CASResponse[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
Status indicating that the CAS was successful and the new value is stored in the cache. -
NOT_FOUND
Status indicating the value was not found in the cache (an add operation may be issued to store the value). -
EXISTS
Status indicating the value was found in the cache, but exists with a different CAS value than expected. In this case, the value must be refetched and the CAS operation tried again. -
OBSERVE_ERROR_IN_ARGS
Status indicating there was an error in specifying the arguments for the Observe. -
OBSERVE_MODIFIED
Status indicating the CAS operation succeeded but the value was subsequently modified during Observe. -
OBSERVE_TIMEOUT
Status indicating there was a Timeout in the Observe operation.
-
-
Constructor Details
-
CASResponse
private CASResponse()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-