Enum StreamFlag

java.lang.Object
java.lang.Enum<StreamFlag>
com.couchbase.client.dcp.message.StreamFlag
All Implemented Interfaces:
Serializable, Comparable<StreamFlag>

public enum StreamFlag extends Enum<StreamFlag>
Flags for "open stream" and "add stream" requests.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicate the server to add stream only if the VBucket is active.
    Specifies that the stream should only send items only if they are on disk.
    Specifies that the server should stream mutations from the current sequence number, this means the start parameter is ignored.
    Specifies that the server should skip rollback if the client is behind the purge seqno, but the request is otherwise satisfiable (i.e. no other rollback checks such as UUID mismatch fail).
    Specifies that the server should stream all mutations up to the current sequence number for that VBucket.
    Deprecated.
    (Removed in 5.0, use OpenConnectionFlag.NO_VALUE when opening the connection instead)
    Indicate the server to check for vb_uuid match even at start_seqno 0 before adding the stream successfully.
    Specifies that the stream should send over all remaining data to the remote node and then set the remote nodes VBucket to active state and the source nodes VBucket to dead.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<StreamFlag>
    decode(int flags)
     
    static int
     
    boolean
    isSet(int flags)
     
    Set<com.couchbase.client.core.topology.BucketCapability>
     
    int
     
    static StreamFlag
    Returns the enum constant of this type with the specified name.
    static StreamFlag[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

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

    • TAKEOVER

      public static final StreamFlag TAKEOVER
      Specifies that the stream should send over all remaining data to the remote node and then set the remote nodes VBucket to active state and the source nodes VBucket to dead.
    • DISK_ONLY

      public static final StreamFlag DISK_ONLY
      Specifies that the stream should only send items only if they are on disk. The first item sent is specified by the start sequence number and items will be sent up to the sequence number specified by the end sequence number or the last on disk item when the stream is created.
    • LATEST

      public static final StreamFlag LATEST
      Specifies that the server should stream all mutations up to the current sequence number for that VBucket. The server will overwrite the value of the end sequence number field with the value of the latest sequence number.
    • NO_VALUE

      @Deprecated public static final StreamFlag NO_VALUE
      Deprecated.
      (Removed in 5.0, use OpenConnectionFlag.NO_VALUE when opening the connection instead)
      Specifies that the server should stream only item key and metadata in the mutations and not stream the value of the item.
    • ACTIVE_VB_ONLY

      @SinceCouchbase("5.0") public static final StreamFlag ACTIVE_VB_ONLY
      Indicate the server to add stream only if the VBucket is active. If the VBucket is not active, the stream request fails with ERR_NOT_MY_VBUCKET (0x07).

      NOTE: This is the only mode supported in modern Couchbase Server versions. The client always requests this flag.

    • STRICT_VB_UUID

      @SinceCouchbase("5.1") public static final StreamFlag STRICT_VB_UUID
      Indicate the server to check for vb_uuid match even at start_seqno 0 before adding the stream successfully. If the flag is set and there is a vb_uuid mismatch at start_seqno 0, then the server returns ENGINE_ROLLBACK error.
    • FROM_LATEST

      @SinceCouchbase("7.2") public static final StreamFlag FROM_LATEST
      Specifies that the server should stream mutations from the current sequence number, this means the start parameter is ignored.
    • IGNORE_PURGED_TOMBSTONES

      @SinceCouchbase("7.2") public static final StreamFlag IGNORE_PURGED_TOMBSTONES
      Specifies that the server should skip rollback if the client is behind the purge seqno, but the request is otherwise satisfiable (i.e. no other rollback checks such as UUID mismatch fail). The client could end up missing purged tombstones (and hence could end up never being told about a document deletion). The intent of this flag is to allow clients who ignore deletes to avoid rollbacks to zero which are solely due to them being behind the purge seqno. This flag was added in Couchbase Server 7.2.
  • Method Details

    • values

      public static StreamFlag[] 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 StreamFlag 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()
    • requiredCapabilities

      public Set<com.couchbase.client.core.topology.BucketCapability> requiredCapabilities()
    • isSet

      public boolean isSet(int flags)
    • encode

      public static int encode(Set<StreamFlag> flags)
    • decode

      public static Set<StreamFlag> decode(int flags)