@InterfaceStability.Experimental @InterfaceAudience.Public public abstract class AbstractSubdocMutationRequest extends AbstractSubdocRequest implements BinarySubdocMutationRequest
Base class for all BinarySubdocMutationRequest
.
EXCEPTION_EMPTY_PATH, EXCEPTION_NULL_PATH
DEFAULT_PARTITION
Modifier | Constructor and Description |
---|---|
protected |
AbstractSubdocMutationRequest(String key,
String path,
ByteBuf fragment,
String bucket,
int expiration,
long cas)
Creates a new
AbstractSubdocMutationRequest . |
protected |
AbstractSubdocMutationRequest(String key,
String path,
ByteBuf fragment,
String bucket,
int expiration,
long cas,
rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable)
Creates a new
AbstractSubdocMutationRequest . |
Modifier and Type | Method and Description |
---|---|
boolean |
attributeAccess()
Access to extended attribute section of the couchbase document
|
void |
attributeAccess(boolean attributeAccess) |
long |
cas() |
boolean |
createIntermediaryPath()
Sets whether missing nodes in the
BinarySubdocRequest.path() should be created as part of this mutation, when possible. |
void |
createIntermediaryPath(boolean createIntermediaryPath)
Modifies the request so that it requires the creation of missing intermediary nodes in the path if set to true.
|
int |
expiration() |
ByteBuf |
fragment()
A
ByteBuf containing the JSON fragment for the mutation. |
cleanUpAndThrow, content, createContent, path, pathLength
key, keyBytes, opaque, partition, partition
bucket, creationTime, incrementRetryCount, observable, password, retryCount, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
content, opcode, path, pathLength
key, keyBytes, opaque, partition, partition
bucket, incrementRetryCount, observable, password, retryCount
creationTime
protected AbstractSubdocMutationRequest(String key, String path, ByteBuf fragment, String bucket, int expiration, long cas)
Creates a new AbstractSubdocMutationRequest
.
key
- the key of the document.path
- the subdocument path to consider inside the document.fragment
- the fragment of valid JSON to mutate into at the site denoted by the path.bucket
- the bucket of the document.expiration
- the TTL of the whole enclosing document.cas
- the cas value for the operationNullPointerException
- if the path is null (see AbstractSubdocRequest.EXCEPTION_NULL_PATH
)protected AbstractSubdocMutationRequest(String key, String path, ByteBuf fragment, String bucket, int expiration, long cas, rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable)
Creates a new AbstractSubdocMutationRequest
.
key
- the key of the document.path
- the subdocument path to consider inside the document.fragment
- the fragment of valid JSON to mutate into at the site denoted by the path.bucket
- the bucket of the document.expiration
- the TTL of the whole enclosing document.cas
- the cas value for the operationobservable
- the observable which receives responses.NullPointerException
- if the path is null (see AbstractSubdocRequest.EXCEPTION_NULL_PATH
)public int expiration()
expiration
in interface BinarySubdocMutationRequest
public ByteBuf fragment()
BinarySubdocMutationRequest
A ByteBuf
containing the JSON fragment for the mutation. It is appended to the BinarySubdocRequest.content()
.
This buffer is to be automatically released once the content has been written on the wire.
fragment
in interface BinarySubdocMutationRequest
public boolean createIntermediaryPath()
BinarySubdocMutationRequest
Sets whether missing nodes in the BinarySubdocRequest.path()
should be created as part of this mutation, when possible. This is represented as an additional flag on the wire.
createIntermediaryPath
in interface BinarySubdocMutationRequest
public void createIntermediaryPath(boolean createIntermediaryPath)
Modifies the request so that it requires the creation of missing intermediary nodes in the path if set to true.
createIntermediaryPath
- true if missing intermediary nodes in the path should be created, false if they should be considered as errors.public boolean attributeAccess()
BinarySubdocMutationRequest
Access to extended attribute section of the couchbase document
attributeAccess
in interface BinarySubdocMutationRequest
public void attributeAccess(boolean attributeAccess)
public long cas()
cas
in interface BinarySubdocMutationRequest
Copyright © 2017 Couchbase, Inc.. All rights reserved.