Package com.couchbase.client.dcp.message
Enum StreamFlag
- All Implemented Interfaces:
Serializable
,Comparable<StreamFlag>
Flags for "open stream" and "add stream" requests.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicate 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 TypeMethodDescriptionstatic Set
<StreamFlag> decode
(int flags) static int
encode
(Set<StreamFlag> flags) boolean
isSet
(int flags) Set
<com.couchbase.client.core.topology.BucketCapability> int
value()
static StreamFlag
Returns the enum constant of this type with the specified name.static StreamFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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
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.(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
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
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
Specifies that the server should stream mutations from the current sequence number, this means the start parameter is ignored. -
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
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
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 nameNullPointerException
- if the argument is null
-
value
public int value() -
requiredCapabilities
-
isSet
public boolean isSet(int flags) -
encode
-
decode
-