Class SubMultiMutationRequest
java.lang.Object
com.couchbase.client.core.message.AbstractCouchbaseRequest
com.couchbase.client.core.message.kv.AbstractKeyValueRequest
com.couchbase.client.core.message.kv.subdoc.multi.SubMultiMutationRequest
- All Implemented Interfaces:
CouchbaseMessage
,CouchbaseRequest
,BinaryRequest
,BinarySubdocMultiMutationRequest
@Committed @Public public class SubMultiMutationRequest extends AbstractKeyValueRequest implements BinarySubdocMultiMutationRequest
Concrete implementation of a
BinarySubdocMultiMutationRequest
.- Since:
- 1.2
- Author:
- Simon Baslé
-
Field Summary
Fields inherited from class com.couchbase.client.core.message.kv.AbstractKeyValueRequest
DEFAULT_PARTITION
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description long
cas()
List<MutationCommand>
commands()
ByteBuf
content()
TheByteBuf
representing the whole list ofBinarySubdocMultiMutationRequest.commands()
.byte
docFlags()
int
expiration()
Methods inherited from class com.couchbase.client.core.message.kv.AbstractKeyValueRequest
afterSpanSet, key, keyBytes, opaque, operationId, partition, partition
Methods inherited from class com.couchbase.client.core.message.AbstractCouchbaseRequest
bucket, complete, creationTime, dispatchHostname, dispatchHostname, emit, fail, incrementRetryCount, isActive, lastLocalId, lastLocalId, lastLocalSocket, lastLocalSocket, lastRemoteSocket, lastRemoteSocket, maxRetryDuration, maxRetryDuration, observable, password, retryAfter, retryAfter, retryCount, retryDelay, retryDelay, span, span, subscriber, succeed, toString, username
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.couchbase.client.core.message.kv.BinaryRequest
key, keyBytes, opaque, partition, partition
Methods inherited from interface com.couchbase.client.core.message.CouchbaseMessage
creationTime
Methods inherited from interface com.couchbase.client.core.message.CouchbaseRequest
bucket, complete, dispatchHostname, dispatchHostname, emit, fail, incrementRetryCount, isActive, lastLocalId, lastLocalId, lastLocalSocket, lastLocalSocket, lastRemoteSocket, lastRemoteSocket, maxRetryDuration, maxRetryDuration, observable, operationId, password, retryAfter, retryAfter, retryCount, retryDelay, retryDelay, span, span, subscriber, succeed, username
-
Constructor Details
-
SubMultiMutationRequest
public SubMultiMutationRequest(String key, String bucket, int expiration, long cas, SubMultiMutationDocOptionsBuilder docOptionsBuilder, List<MutationCommand> commands)Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.expiration
- the expiration (or TTL) to apply to the whole document additionally to the mutations.cas
- the CAS value to check for when applying the whole set of mutations.docOptionsBuilder
- the document options builderSubMultiMutationDocOptionsBuilder
.commands
- the set of internal mutations to apply to the document.
-
SubMultiMutationRequest
public SubMultiMutationRequest(String key, String bucket, int expiration, long cas, SubMultiMutationDocOptionsBuilder docOptionsBuilder, MutationCommand... commands)Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.expiration
- the expiration (or TTL) to apply to the whole document additionally to the mutations.cas
- the CAS value to check for when applying the whole set of mutations.docOptionsBuilder
- the document options builderSubMultiMutationDocOptionsBuilder
.commands
- the set of internal mutations to apply to the document.
-
SubMultiMutationRequest
Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.commands
- the set of internal mutations to apply to the document.
-
SubMultiMutationRequest
public SubMultiMutationRequest(String key, String bucket, SubMultiMutationDocOptionsBuilder docOptionsBuilder, List<MutationCommand> commands)Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.docOptionsBuilder
- the document options builderSubMultiMutationDocOptionsBuilder
.commands
- the set of internal mutations to apply to the document.
-
SubMultiMutationRequest
Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.commands
- the set of internal mutations to apply to the document.
-
SubMultiMutationRequest
public SubMultiMutationRequest(String key, String bucket, SubMultiMutationDocOptionsBuilder docOptionsBuilder, MutationCommand... commands)Create a newSubMultiMutationRequest
.- Parameters:
key
- the key of the document to mutate into.bucket
- the bucket of the document.docOptionsBuilder
- the document options builderSubMultiMutationDocOptionsBuilder
.commands
- the set of internal mutations to apply to the document.
-
-
Method Details
-
expiration
public int expiration()- Specified by:
expiration
in interfaceBinarySubdocMultiMutationRequest
- Returns:
- the expiration (or TTL) to apply to the document along the mutations, 0 for no TTL.
-
cas
public long cas()- Specified by:
cas
in interfaceBinarySubdocMultiMutationRequest
- Returns:
- the CAS to use for the mutations (if needed) or 0L to ignore
-
commands
- Specified by:
commands
in interfaceBinarySubdocMultiMutationRequest
- Returns:
- a list of the
MutationCommand
describing the multiple operations to apply.
-
content
Description copied from interface:BinarySubdocMultiMutationRequest
TheByteBuf
representing the whole list ofBinarySubdocMultiMutationRequest.commands()
. This buffer is to be automatically released once the message has been written on the wire.- Specified by:
content
in interfaceBinarySubdocMultiMutationRequest
- Returns:
- the ByteBuf to serve as a memcached protocol message body.
-
docFlags
public byte docFlags()- Specified by:
docFlags
in interfaceBinarySubdocMultiMutationRequest
- Returns:
- the document flags for the Request
-