Enum ResponseStatus

java.lang.Object
java.lang.Enum<ResponseStatus>
com.couchbase.client.core.message.ResponseStatus
All Implemented Interfaces:
Serializable, Comparable<ResponseStatus>, java.lang.constant.Constable

public enum ResponseStatus
extends Enum<ResponseStatus>
Typesafe status code returned by CouchbaseResponses.
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 namespaces
    SUBDOC_XATTR_UNKNOWN_MACRO
    Subdocument extended attribute error indicating the server couldn't expand the supplied macro
    SUCCESS
    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 current ResponseStatus 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.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SUCCESS

      public static final ResponseStatus SUCCESS
      If the response is successful and finished.
    • EXISTS

      public static final ResponseStatus EXISTS
      If the request expected the document to not exist, but it existed already.
    • NOT_EXISTS

      public static final ResponseStatus NOT_EXISTS
      If the request expected the document to exit, but it didn't exist already.
    • NOT_STORED

      public static final ResponseStatus NOT_STORED
      The response indicates that a mutation try did not happen properly.
    • TOO_BIG

      public static final ResponseStatus TOO_BIG
      The response indicates that the request was too big for some reason.
    • TEMPORARY_FAILURE

      public static final ResponseStatus TEMPORARY_FAILURE
      Indicates a failure which is considered to be transient.
    • SERVER_BUSY

      public static final ResponseStatus SERVER_BUSY
      Indicates that the server is busy, which is considered to be transient.
    • COMMAND_UNAVAILABLE

      public static final ResponseStatus COMMAND_UNAVAILABLE
      Indicates that the request type was dispatched but not known by the server or it is not supported.
    • OUT_OF_MEMORY

      public static final ResponseStatus OUT_OF_MEMORY
      The requested service is currently out of memory.
    • INVALID_ARGUMENTS

      public static final ResponseStatus INVALID_ARGUMENTS
      The service reported that the request arguments are invalid.
    • ACCESS_ERROR

      public static final ResponseStatus ACCESS_ERROR
      Access error. It can also happen if some operations are not supported like subdoc.
    • INTERNAL_ERROR

      public static final ResponseStatus INTERNAL_ERROR
      The remote service failed for an internal reason.
    • FAILURE

      public static final ResponseStatus 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

      public static final ResponseStatus 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

      public static final ResponseStatus RANGE_ERROR
      The server reports that requested vBucketID or sequence number does not fit allowed range.
    • ROLLBACK

      public static final ResponseStatus 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

      public static final ResponseStatus SUBDOC_PATH_NOT_FOUND
      Subdocument error indicating the path inside the JSON is invalid.
    • SUBDOC_PATH_MISMATCH

      public static final ResponseStatus 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

      public static final ResponseStatus 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

      public static final ResponseStatus 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

      public static final ResponseStatus 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

      public static final ResponseStatus SUBDOC_VALUE_CANTINSERT
      Subdocument error indicating that a mutation fragment cannot be applied without resulting in invalid JSON.
    • SUBDOC_DOC_NOT_JSON

      public static final ResponseStatus SUBDOC_DOC_NOT_JSON
      Subdocument error indicating that the target document is not flagged or recognized as JSON.
    • SUBDOC_NUM_RANGE

      public static final ResponseStatus SUBDOC_NUM_RANGE
      Subdocument error indicating that, for arithmetic subdoc operations, the existing number is already too large.
    • SUBDOC_DELTA_RANGE

      public static final ResponseStatus SUBDOC_DELTA_RANGE
      Subdocument error indicating that for arithmetic subdoc operations, the operation will make the value too large.
    • SUBDOC_PATH_EXISTS

      public static final ResponseStatus 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

      public static final ResponseStatus SUBDOC_VALUE_TOO_DEEP
      Subdocument error indicating that inserting the fragment would make the document too deep.
    • SUBDOC_INVALID_COMBO

      public static final ResponseStatus 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

      public static final ResponseStatus 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

      public static final ResponseStatus SUBDOC_XATTR_UNKNOWN_MACRO
      Subdocument extended attribute error indicating the server couldn't expand the supplied macro
    • SUBDOC_XATTR_INVALID_KEY_COMBO

      public static final ResponseStatus SUBDOC_XATTR_INVALID_KEY_COMBO
      Subdocument extended attribute error indicating use of key paths from different namespaces
    • LOCKED

      public static final ResponseStatus LOCKED
      Indicates that the document is locked at the moment.
  • Method Details

    • values

      public static ResponseStatus[] 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

      public static ResponseStatus valueOf​(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isSuccess

      public boolean isSuccess()
      Check if the current ResponseStatus is success.