Enum ServerFeature

java.lang.Object
java.lang.Enum<ServerFeature>
com.couchbase.client.core.io.netty.kv.ServerFeature
All Implemented Interfaces:
Serializable, Comparable<ServerFeature>, java.lang.constant.Constable

@Internal public enum ServerFeature extends Enum<ServerFeature>
Describes all the different negotiation modes between the server and the SDK.
Since:
2.0.0
  • 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
    Allows the server to accept requests with flexible extras.
    The client wants the server to send a CLUSTERMAP_CHANGE_NOTIFICATION request to the client whenever a new bucket config is available for the connected bucket, or global config if no bucket is selected.
    The client wants the server to send a CLUSTERMAP_CHANGE_NOTIFICATION request to the client whenever a new bucket config is available for the connected bucket, or global config if no bucket is selected.
    Enables the collections feature.
    Enables the "create as deleted" flag, allowing a document to be created in a tombstoned state.
    Deprecated.
    this feature is considered retired.
    Notify the server that the client correctly deals with the optional payload in a "Not My Vbucket" response.
    Enables Duplex mode support.
    If enabled, the client may include its current config version in a GET_CLUSTER_CONFIG request, and the server may respond to such a request with an empty value to indicate the client already has the latest version.
    Enables JSON data identification support.
    Returns the sequence number on every mutation.
    Enables preserving expiry when updating document.
    When enabled, the server will insert frame info field(s) in the response containing the amount of read and write units the command used on the server, and the time the command spent throttled on the server.
    Enable select_bucket support.
    Enable snappy-based compression support for CRUD operations.
    Notify the server that the client honors the Snappy datatype bit on all response packets, regardless of request opcode.
    When enabled, the server will allow SUBDOC_MULTI_LOOKUP for a document to be accepted by a replica node and will return the replica for the document.
    Specify durability requirements for mutations.
    Disable TCP Nodelay.
    Enables TCP Nodelay.
    The TLS feature.
    Enable tracing support.
    Tell the server that we're ok with the server reordering the execution of commands.
    Enables the vattr feature.
    Enable xattr support.
    Enable extended error map support.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns an int whose low 16 bits contain the feature's value in the wire protocol.
    Returns the enum constant of this type with the specified name.
    static ServerFeature[]
    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

    • DATATYPE

      @SinceCouchbase("4.0") @Deprecated public static final ServerFeature DATATYPE
      Deprecated.
      this feature is considered retired.
      The custom datatype feature.
    • TLS

      public static final ServerFeature TLS
      The TLS feature.
    • TCPNODELAY

      @SinceCouchbase("4.0") public static final ServerFeature TCPNODELAY
      Enables TCP Nodelay.
    • MUTATION_SEQNO

      @SinceCouchbase("4.0") public static final ServerFeature MUTATION_SEQNO
      Returns the sequence number on every mutation.
    • TCPDELAY

      @SinceCouchbase("4.0") public static final ServerFeature TCPDELAY
      Disable TCP Nodelay.
    • XATTR

      @SinceCouchbase("5.0") public static final ServerFeature XATTR
      Enable xattr support.
    • XERROR

      @SinceCouchbase("5.0") public static final ServerFeature XERROR
      Enable extended error map support.
    • SELECT_BUCKET

      @SinceCouchbase("5.0") public static final ServerFeature SELECT_BUCKET
      Enable select_bucket support.
    • SNAPPY

      @SinceCouchbase("5.5") public static final ServerFeature SNAPPY
      Enable snappy-based compression support for CRUD operations.

      History note: Due to incorrect implementations in some clients, this feature enables Snappy compression only for CRUD operations.

      See Also:
    • JSON

      @SinceCouchbase("5.5") public static final ServerFeature JSON
      Enables JSON data identification support.
    • DUPLEX

      @SinceCouchbase("5.5") public static final ServerFeature DUPLEX
      Enables Duplex mode support.
    • CLUSTERMAP_CHANGE_NOTIFICATION

      @SinceCouchbase("5.5") public static final ServerFeature CLUSTERMAP_CHANGE_NOTIFICATION
      The client wants the server to send a CLUSTERMAP_CHANGE_NOTIFICATION request to the client whenever a new bucket config is available for the connected bucket, or global config if no bucket is selected.

      The notification includes the config epoch and revision (as extras), as well as the full config JSON in the value of the request.

      Note: When DEDUPE_NOT_MY_VBUCKET_CLUSTERMAP is also enabled, the server does not send a notification if it previously sent the new config in the body of a "Not My Vbucket" response.

      See Also:
    • UNORDERED_EXECUTION

      @SinceCouchbase("5.5") public static final ServerFeature UNORDERED_EXECUTION
      Tell the server that we're ok with the server reordering the execution of commands.
    • TRACING

      @SinceCouchbase("5.5") public static final ServerFeature TRACING
      Enable tracing support.
    • ALT_REQUEST

      @SinceCouchbase("6.5") public static final ServerFeature ALT_REQUEST
      Allows the server to accept requests with flexible extras.
    • SYNC_REPLICATION

      @SinceCouchbase("6.5") public static final ServerFeature SYNC_REPLICATION
      Specify durability requirements for mutations.
    • COLLECTIONS

      @SinceCouchbase("7.0") public static final ServerFeature COLLECTIONS
      Enables the collections feature.

      History note: There was a "collections" feature in Couchbase in 5.0, but it had a different code (0x09) that has since been retired.

    • SNAPPY_EVERYWHERE

      @SinceCouchbase("7.6") public static final ServerFeature SNAPPY_EVERYWHERE
      Notify the server that the client honors the Snappy datatype bit on all response packets, regardless of request opcode.
      See Also:
    • PRESERVE_TTL

      @SinceCouchbase("7.0") public static final ServerFeature PRESERVE_TTL
      Enables preserving expiry when updating document.
    • VATTR

      @SinceCouchbase("6.5.1") public static final ServerFeature VATTR
      Enables the vattr feature.

      Note that vattrs (such as $document) were available before this, but this flag signifies that if a vattr is requested that the server does not recognise, it will be rejected with the correct XATTR_UNKNOWN_VATTR error, rather than the connection being disconnected.

    • CREATE_AS_DELETED

      @SinceCouchbase("6.6") public static final ServerFeature CREATE_AS_DELETED
      Enables the "create as deleted" flag, allowing a document to be created in a tombstoned state.
    • REPORT_UNIT_USAGE

      @SinceCouchbase("7.2") public static final ServerFeature REPORT_UNIT_USAGE
      When enabled, the server will insert frame info field(s) in the response containing the amount of read and write units the command used on the server, and the time the command spent throttled on the server. The fields will only be inserted if non-zero.
    • SUBDOC_READ_REPLICA

      @SinceCouchbase("7.6") public static final ServerFeature SUBDOC_READ_REPLICA
      When enabled, the server will allow SUBDOC_MULTI_LOOKUP for a document to be accepted by a replica node and will return the replica for the document.
    • GET_CLUSTER_CONFIG_WITH_KNOWN_VERSION

      @SinceCouchbase("7.6") public static final ServerFeature GET_CLUSTER_CONFIG_WITH_KNOWN_VERSION
      If enabled, the client may include its current config version in a GET_CLUSTER_CONFIG request, and the server may respond to such a request with an empty value to indicate the client already has the latest version.

      Note: Does not control server behavior. A server that supports this feature always allows such requests, regardless of whether the feature was enabled.

    • DEDUPE_NOT_MY_VBUCKET_CLUSTERMAP

      @SinceCouchbase("7.6") public static final ServerFeature DEDUPE_NOT_MY_VBUCKET_CLUSTERMAP
      Notify the server that the client correctly deals with the optional payload in a "Not My Vbucket" response. When enabled, this prevents the server from sending redundant config change notifications across "Not My Vbucket" responses as well as clustermap change notification server requests.
      See Also:
    • CLUSTERMAP_CHANGE_NOTIFICATION_BRIEF

      @SinceCouchbase("7.6") public static final ServerFeature CLUSTERMAP_CHANGE_NOTIFICATION_BRIEF
      The client wants the server to send a CLUSTERMAP_CHANGE_NOTIFICATION request to the client whenever a new bucket config is available for the connected bucket, or global config if no bucket is selected.

      The client wants the notification to be "brief", including only the config epoch and revision (as extras), but not the full config JSON itself.

      This feature is an upgrade from CLUSTERMAP_CHANGE_NOTIFICATION. If the server supports both, and the client requests both, only the brief version is enabled.

      NOTE: When DEDUPE_NOT_MY_VBUCKET_CLUSTERMAP is also enabled, the server does not send a notification if it previously sent the new config in the body of a "Not My Vbucket" response.

      See Also:
  • Method Details

    • values

      public static ServerFeature[] 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 ServerFeature 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
    • value

      public int value()
      Returns an int whose low 16 bits contain the feature's value in the wire protocol.
      Returns:
      the actual wire value.