public enum ResponseStatus extends Enum<ResponseStatus>
ResponseStatus
describes what kind of response came back for a specific
request.
Note that this status is not tied to any protocol or service, rather there must be a mapping performed from actual protocol-level response codes (be it http or memcache protocol) to this abstract status. This allows to achieve a level of consistency in status codes that is not tied to a particular protocol.
Enum Constant and Description |
---|
DURABILITY_IMPOSSIBLE
Valid request, but given durability requirements are impossible to achieve.
|
DURABILITY_INVALID_LEVEL
Invalid request.
|
EXISTS
The document exists (but maybe with another cas, depending on the op).
|
INTERNAL_SERVER_ERROR
The server indicated an internal error.
|
INVALID_ARGS |
INVALID_REQUEST |
LOCKED
The requested resource is locked.
|
NO_ACCESS
The server indicated that the given message failed because of a permission
violation.
|
NO_BUCKET
The server indicates that no bucket is selected.
|
NOT_FOUND
Indicates that the requested entity has not been found on the server.
|
NOT_INITIALIZED
The server reports that it is not initialized yet.
|
NOT_MY_VBUCKET
In a kv request, signaling that the vbucket is on a different node.
|
NOT_STORED
The resource was not stored for some reason.
|
OUT_OF_MEMORY
The server is out of memory.
|
SERVER_BUSY
The server is busy for some reason.
|
SUBDOC_FAILURE
One or more attempted subdoc operations failed.
|
SUCCESS
Indicates a successful response in general.
|
SYNC_WRITE_AMBIGUOUS
The SyncWrite request has not completed in the specified time and has ambiguous result.
|
SYNC_WRITE_IN_PROGRESS
Returned if an attempt is made to mutate a key which already has a SyncWrite pending.
|
SYNC_WRITE_RE_COMMIT_IN_PROGRESS
Returned if the requested key has a SyncWrite which is being re-committed.
|
TEMPORARY_FAILURE
The server could temporarily not fulfill the request.
|
TOO_BIG
The written resource is too big.
|
TOO_MANY_REQUESTS |
UNKNOWN
Indicates an unknown status returned from the server, please check the
events/logs for further information.
|
UNKNOWN_COLLECTION |
UNSUPPORTED
The server indicated that the given message is not supported.
|
Modifier and Type | Method and Description |
---|---|
boolean |
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.
|
public static final ResponseStatus SUCCESS
public static final ResponseStatus NOT_FOUND
public static final ResponseStatus EXISTS
public static final ResponseStatus UNKNOWN
public static final ResponseStatus NO_ACCESS
public static final ResponseStatus NOT_STORED
public static final ResponseStatus TEMPORARY_FAILURE
public static final ResponseStatus SERVER_BUSY
public static final ResponseStatus OUT_OF_MEMORY
public static final ResponseStatus LOCKED
public static final ResponseStatus UNSUPPORTED
public static final ResponseStatus NO_BUCKET
public static final ResponseStatus NOT_MY_VBUCKET
public static final ResponseStatus TOO_BIG
public static final ResponseStatus SUBDOC_FAILURE
public static final ResponseStatus DURABILITY_INVALID_LEVEL
public static final ResponseStatus DURABILITY_IMPOSSIBLE
because insufficient configured replicas are connected. Assuming level=majority and C=number of configured nodes, durability becomes impossible if floor((C + 1) / 2) nodes or greater are offline.
public static final ResponseStatus SYNC_WRITE_IN_PROGRESS
Transient, the client would typically retry (possibly with backoff). Similar to ELOCKED.
public static final ResponseStatus SYNC_WRITE_RE_COMMIT_IN_PROGRESS
Transient, the client would typically retry (possibly with backoff). Similar to ELOCKED.
public static final ResponseStatus SYNC_WRITE_AMBIGUOUS
it may Succeed or Fail; but the final value is not yet known.
public static final ResponseStatus INTERNAL_SERVER_ERROR
public static final ResponseStatus TOO_MANY_REQUESTS
public static final ResponseStatus INVALID_ARGS
public static final ResponseStatus INVALID_REQUEST
public static final ResponseStatus UNKNOWN_COLLECTION
public static final ResponseStatus NOT_INITIALIZED
public static ResponseStatus[] values()
for (ResponseStatus c : ResponseStatus.values()) System.out.println(c);
public static ResponseStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean success()
Copyright © 2020 Couchbase, Inc.. All rights reserved.