Enum ResponseStatus

  • All Implemented Interfaces:
    Serializable, Comparable<ResponseStatus>

    public enum ResponseStatus
    extends Enum<ResponseStatus>
    The 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.

    Since:
    1.0.0
    • Enum Constant Detail

      • SUCCESS

        public static final ResponseStatus SUCCESS
        Indicates a successful response in general.
      • NOT_FOUND

        public static final ResponseStatus NOT_FOUND
        Indicates that the requested entity has not been found on the server.
      • EXISTS

        public static final ResponseStatus EXISTS
        The document exists (but maybe with another cas, depending on the op).
      • UNKNOWN

        public static final ResponseStatus UNKNOWN
        Indicates an unknown status returned from the server, please check the events/logs for further information.
      • NO_ACCESS

        public static final ResponseStatus NO_ACCESS
        The server indicated that the given message failed because of a permission violation.
      • NOT_STORED

        public static final ResponseStatus NOT_STORED
        The resource was not stored for some reason.
      • TEMPORARY_FAILURE

        public static final ResponseStatus TEMPORARY_FAILURE
        The server could temporarily not fulfill the request.
      • SERVER_BUSY

        public static final ResponseStatus SERVER_BUSY
        The server is busy for some reason.
      • OUT_OF_MEMORY

        public static final ResponseStatus OUT_OF_MEMORY
        The server is out of memory.
      • LOCKED

        public static final ResponseStatus LOCKED
        The requested resource is locked.
      • UNSUPPORTED

        public static final ResponseStatus UNSUPPORTED
        The server indicated that the given message is not supported.
      • NO_BUCKET

        public static final ResponseStatus NO_BUCKET
        The server indicates that no bucket is selected.
      • NOT_MY_VBUCKET

        public static final ResponseStatus NOT_MY_VBUCKET
        In a kv request, signaling that the vbucket is on a different node.
      • TOO_BIG

        public static final ResponseStatus TOO_BIG
        The written resource is too big.
      • SUBDOC_FAILURE

        public static final ResponseStatus SUBDOC_FAILURE
        One or more attempted subdoc operations failed.
      • DURABILITY_INVALID_LEVEL

        public static final ResponseStatus DURABILITY_INVALID_LEVEL
        Invalid request. Returned if an invalid durability level is specified.
      • DURABILITY_IMPOSSIBLE

        public static final ResponseStatus DURABILITY_IMPOSSIBLE
        Valid request, but given durability requirements are impossible to achieve.

        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.

      • SYNC_WRITE_IN_PROGRESS

        public static final ResponseStatus SYNC_WRITE_IN_PROGRESS
        Returned if an attempt is made to mutate a key which already has a SyncWrite pending.

        Transient, the client would typically retry (possibly with backoff). Similar to ELOCKED.

      • SYNC_WRITE_RE_COMMIT_IN_PROGRESS

        public static final ResponseStatus SYNC_WRITE_RE_COMMIT_IN_PROGRESS
        Returned if the requested key has a SyncWrite which is being re-committed.

        Transient, the client would typically retry (possibly with backoff). Similar to ELOCKED.

      • SYNC_WRITE_AMBIGUOUS

        public static final ResponseStatus SYNC_WRITE_AMBIGUOUS
        The SyncWrite request has not completed in the specified time and has ambiguous result.

        it may Succeed or Fail; but the final value is not yet known.

      • INTERNAL_SERVER_ERROR

        public static final ResponseStatus INTERNAL_SERVER_ERROR
        The server indicated an internal error.
      • TOO_MANY_REQUESTS

        public static final ResponseStatus TOO_MANY_REQUESTS
      • UNKNOWN_COLLECTION

        public static final ResponseStatus UNKNOWN_COLLECTION
      • COLLECTIONS_MANIFEST_AHEAD

        public static final ResponseStatus COLLECTIONS_MANIFEST_AHEAD
      • NO_COLLECTIONS_MANIFEST

        public static final ResponseStatus NO_COLLECTIONS_MANIFEST
      • CANNOT_APPLY_COLLECTIONS_MANIFEST

        public static final ResponseStatus CANNOT_APPLY_COLLECTIONS_MANIFEST
      • NOT_INITIALIZED

        public static final ResponseStatus NOT_INITIALIZED
        The server reports that it is not initialized yet.
    • Method Detail

      • values

        public static ResponseStatus[] 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 (ResponseStatus c : ResponseStatus.values())
            System.out.println(c);
        
        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
      • success

        public boolean success()