Enum ResponseStatus
- All Implemented Interfaces:
Serializable
,Comparable<ResponseStatus>
,java.lang.constant.Constable
public enum ResponseStatus extends Enum<ResponseStatus>
Typesafe status code returned by
CouchbaseResponse
s.- Since:
- 1.0
- Author:
- Michael Nitschinger
- See Also:
ResponseStatusConverter
,KeyValueStatus
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCESS_ERROR
Access error.COMMAND_UNAVAILABLE
Indicates that the request type was dispatched but not known by the server or it is not supported.EXISTS
If the request expected the document to not exist, but it existed already.FAILURE
Generic failure status.INTERNAL_ERROR
The remote service failed for an internal reason.INVALID_ARGUMENTS
The service reported that the request arguments are invalid.LOCKED
Indicates that the document is locked at the moment.NOT_EXISTS
If the request expected the document to exit, but it didn't exist already.NOT_STORED
The response indicates that a mutation try did not happen properly.OUT_OF_MEMORY
The requested service is currently out of memory.RANGE_ERROR
The server reports that requested vBucketID or sequence number does not fit allowed range.RETRY
The underlying response indicates retry is in order.ROLLBACK
The server tells client to rollback its view of the DCP stream state.SERVER_BUSY
Indicates that the server is busy, which is considered to be transient.SUBDOC_DELTA_RANGE
Subdocument error indicating that for arithmetic subdoc operations, the operation will make the value too large.SUBDOC_DOC_NOT_JSON
Subdocument error indicating that the target document is not flagged or recognized as JSON.SUBDOC_DOC_TOO_DEEP
Subdocument error indicating that the target document's level of JSON nesting is too deep to be processed by the subdoc service.SUBDOC_INVALID_COMBO
Subdocument error indicating that, in a multi-specification, an invalid combination of commands were specified, including the case where too many paths were specified.SUBDOC_MULTI_PATH_FAILURE
Subdocument error indicating that, in a multi-specification, one or more commands failed to execute on a document which exists (ie.SUBDOC_NUM_RANGE
Subdocument error indicating that, for arithmetic subdoc operations, the existing number is already too large.SUBDOC_PATH_EXISTS
Subdocument error indicating that the last component of the path already exist despite the mutation operation expecting it not to exist (the mutation was expecting to create only the last part of the path and store the fragment there).SUBDOC_PATH_INVALID
Subdocument error indicating that the path provided is invalid.SUBDOC_PATH_MISMATCH
Subdocument error indicating one of the path components was denoting a wrong type (eg.SUBDOC_PATH_NOT_FOUND
Subdocument error indicating the path inside the JSON is invalid.SUBDOC_PATH_TOO_BIG
Subdocument error indicating that the path is too large (ie.SUBDOC_VALUE_CANTINSERT
Subdocument error indicating that a mutation fragment cannot be applied without resulting in invalid JSON.SUBDOC_VALUE_TOO_DEEP
Subdocument error indicating that inserting the fragment would make the document too deep.SUBDOC_XATTR_INVALID_KEY_COMBO
Subdocument extended attribute error indicating use of key paths from different namespacesSUBDOC_XATTR_UNKNOWN_MACRO
Subdocument extended attribute error indicating the server couldn't expand the supplied macroSUCCESS
If the response is successful and finished.TEMPORARY_FAILURE
Indicates a failure which is considered to be transient.TOO_BIG
The response indicates that the request was too big for some reason. -
Method Summary
Modifier and Type Method Description boolean
isSuccess()
Check if the currentResponseStatus
is success.static ResponseStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static ResponseStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
If the response is successful and finished. -
EXISTS
If the request expected the document to not exist, but it existed already. -
NOT_EXISTS
If the request expected the document to exit, but it didn't exist already. -
NOT_STORED
The response indicates that a mutation try did not happen properly. -
TOO_BIG
The response indicates that the request was too big for some reason. -
TEMPORARY_FAILURE
Indicates a failure which is considered to be transient. -
SERVER_BUSY
Indicates that the server is busy, which is considered to be transient. -
COMMAND_UNAVAILABLE
Indicates that the request type was dispatched but not known by the server or it is not supported. -
OUT_OF_MEMORY
The requested service is currently out of memory. -
INVALID_ARGUMENTS
The service reported that the request arguments are invalid. -
ACCESS_ERROR
Access error. It can also happen if some operations are not supported like subdoc. -
INTERNAL_ERROR
The remote service failed for an internal reason. -
FAILURE
Generic failure status. Usually indicates a server status code that is unknown to the SDK (for binary responses it can be found in the response). -
RETRY
The underlying response indicates retry is in order. This is a internal response and should not bubble up to the user level. -
RANGE_ERROR
The server reports that requested vBucketID or sequence number does not fit allowed range. -
ROLLBACK
The server tells client to rollback its view of the DCP stream state. New sequence number passed in the payload. -
SUBDOC_PATH_NOT_FOUND
Subdocument error indicating the path inside the JSON is invalid. -
SUBDOC_PATH_MISMATCH
Subdocument error indicating one of the path components was denoting a wrong type (eg. trying to access an array index in an entry that isn't an array). Also for arithmetic operations when the value of the path is not a number. -
SUBDOC_PATH_INVALID
Subdocument error indicating that the path provided is invalid. For operations requiring an array index, this is returned if the last component of that path isn't an array. Similarly for operations requiring a dictionary, if the last component isn't a dictionary but eg. an array index. -
SUBDOC_PATH_TOO_BIG
Subdocument error indicating that the path is too large (ie. the string is too long) or too deep (more that 32 components). -
SUBDOC_DOC_TOO_DEEP
Subdocument error indicating that the target document's level of JSON nesting is too deep to be processed by the subdoc service. -
SUBDOC_VALUE_CANTINSERT
Subdocument error indicating that a mutation fragment cannot be applied without resulting in invalid JSON. -
SUBDOC_DOC_NOT_JSON
Subdocument error indicating that the target document is not flagged or recognized as JSON. -
SUBDOC_NUM_RANGE
Subdocument error indicating that, for arithmetic subdoc operations, the existing number is already too large. -
SUBDOC_DELTA_RANGE
Subdocument error indicating that for arithmetic subdoc operations, the operation will make the value too large. -
SUBDOC_PATH_EXISTS
Subdocument error indicating that the last component of the path already exist despite the mutation operation expecting it not to exist (the mutation was expecting to create only the last part of the path and store the fragment there). -
SUBDOC_VALUE_TOO_DEEP
Subdocument error indicating that inserting the fragment would make the document too deep. -
SUBDOC_INVALID_COMBO
Subdocument error indicating that, in a multi-specification, an invalid combination of commands were specified, including the case where too many paths were specified. -
SUBDOC_MULTI_PATH_FAILURE
Subdocument error indicating that, in a multi-specification, one or more commands failed to execute on a document which exists (ie. the key was valid). -
SUBDOC_XATTR_UNKNOWN_MACRO
Subdocument extended attribute error indicating the server couldn't expand the supplied macro -
SUBDOC_XATTR_INVALID_KEY_COMBO
Subdocument extended attribute error indicating use of key paths from different namespaces -
LOCKED
Indicates that the document is locked at the moment.
-
-
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
-
isSuccess
public boolean isSuccess()Check if the currentResponseStatus
is success.
-