Enum KeyValueStatus
- All Implemented Interfaces:
Serializable
,Comparable<KeyValueStatus>
,java.lang.constant.Constable
public enum KeyValueStatus extends Enum<KeyValueStatus>
Enum describing all known response status codes that could be seen on the KeyValue protocol.
Based on include/memcached/protocol_binary.h from memcached repository.
- Since:
- 1.2.0
- Author:
- Sergey Avseyev, Michael Nitschinger
- See Also:
ResponseStatus
,ResponseStatusConverter
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description short
code()
String
description()
static KeyValueStatus
valueOf(short code)
Determine the rightKeyValueStatus
for the given status code.static KeyValueStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static KeyValueStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
SUCCESS
-
ERR_NOT_FOUND
-
ERR_EXISTS
-
ERR_TOO_BIG
-
ERR_INVALID
-
ERR_NOT_STORED
-
ERR_DELTA_BADVAL
-
ERR_NOT_MY_VBUCKET
-
ERR_NO_BUCKET
-
ERR_AUTH_STALE
-
ERR_AUTH_ERROR
-
ERR_AUTH_CONTINUE
-
ERR_RANGE
-
ERR_ROLLBACK
-
ERR_ACCESS
-
ERR_NOT_INITIALIZED
-
ERR_UNKNOWN_COMMAND
-
ERR_NO_MEM
-
ERR_NOT_SUPPORTED
-
ERR_INTERNAL
-
ERR_BUSY
-
ERR_TEMP_FAIL
-
ERR_SUBDOC_PATH_NOT_FOUND
-
ERR_SUBDOC_PATH_MISMATCH
-
ERR_SUBDOC_PATH_INVALID
-
ERR_SUBDOC_PATH_TOO_BIG
-
ERR_SUBDOC_DOC_TOO_DEEP
-
ERR_SUBDOC_VALUE_CANTINSERT
-
ERR_SUBDOC_DOC_NOT_JSON
-
ERR_SUBDOC_NUM_RANGE
-
ERR_SUBDOC_DELTA_RANGE
-
ERR_SUBDOC_PATH_EXISTS
-
ERR_SUBDOC_VALUE_TOO_DEEP
-
ERR_SUBDOC_INVALID_COMBO
-
ERR_SUBDOC_MULTI_PATH_FAILURE
-
ERR_SUBDOC_XATTR_INVALID_FLAG_COMBO
-
ERR_SUBDOC_XATTR_INVALID_KEY_COMBO
-
ERR_SUBDOC_XATTR_UNKNOWN_MACRO
-
SUBDOC_SUCCESS_DELETED_DOCUMENT
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
valueOf
Determine the rightKeyValueStatus
for the given status code. Certain status codes are checked upfront since they are most commonly converted (this avoids iterating through the full enum values list, especially in the non-corner or failure case variants).- Parameters:
code
- the status code to check.- Returns:
- the matched code, or unknown if none is found.
-
code
public short code() -
description
-