Package net.spy.memcached
Enum CASResponse
- java.lang.Object
-
- java.lang.Enum<CASResponse>
-
- net.spy.memcached.CASResponse
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CASResponse>
public enum CASResponse extends java.lang.Enum<CASResponse>
Response codes for a CAS operation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXISTS
Status indicating the value was found in the cache, but exists with a different CAS value than expected.NOT_FOUND
Status indicating the value was not found in the cache (an add operation may be issued to store the value).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.OK
Status indicating that the CAS was successful and the new value is stored in the cache.
-
Constructor Summary
Constructors Modifier Constructor Description private
CASResponse()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CASResponse
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CASResponse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final CASResponse OK
Status indicating that the CAS was successful and the new value is stored in the cache.
-
NOT_FOUND
public static final CASResponse NOT_FOUND
Status indicating the value was not found in the cache (an add operation may be issued to store the value).
-
EXISTS
public static final CASResponse 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
public static final CASResponse OBSERVE_ERROR_IN_ARGS
Status indicating there was an error in specifying the arguments for the Observe.
-
OBSERVE_MODIFIED
public static final CASResponse OBSERVE_MODIFIED
Status indicating the CAS operation succeeded but the value was subsequently modified during Observe.
-
OBSERVE_TIMEOUT
public static final CASResponse OBSERVE_TIMEOUT
Status indicating there was a Timeout in the Observe operation.
-
-
Method Detail
-
values
public static CASResponse[] 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 (CASResponse c : CASResponse.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CASResponse 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
-
-