@InterfaceStability.Experimental @InterfaceAudience.Public public class SubArrayRequest extends AbstractSubdocMutationRequest
A request covering all sub-document array operations (see SubArrayRequest.ArrayOperation
).
Modifier and Type | Class and Description |
---|---|
static class |
SubArrayRequest.ArrayOperation |
EXCEPTION_EMPTY_PATH, EXCEPTION_NULL_PATH
DEFAULT_PARTITION
Constructor and Description |
---|
SubArrayRequest(String key,
String path,
SubArrayRequest.ArrayOperation arrayOp,
ByteBuf fragment,
String bucket)
Creates a new
SubArrayRequest of type arrayOp. |
SubArrayRequest(String key,
String path,
SubArrayRequest.ArrayOperation arrayOp,
ByteBuf fragment,
String bucket,
int expiration,
long cas)
Creates a new
SubArrayRequest of type arrayOp. |
Modifier and Type | Method and Description |
---|---|
SubArrayRequest.ArrayOperation |
arrayOperation() |
byte |
opcode() |
cas, createIntermediaryPath, createIntermediaryPath, expiration, fragment
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, path, pathLength
key, keyBytes, opaque, partition, partition
bucket, incrementRetryCount, observable, password, retryCount
creationTime
public SubArrayRequest(String key, String path, SubArrayRequest.ArrayOperation arrayOp, ByteBuf fragment, String bucket, int expiration, long cas)
Creates a new SubArrayRequest
of type arrayOp.
key
- the key of the document.path
- the subdocument path to consider inside the document.arrayOp
- the specific SubArrayRequest.ArrayOperation
to perform.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
)IllegalArgumentException
- if the operation is SubArrayRequest.ArrayOperation.INSERT
and path is empty (see AbstractSubdocRequest.EXCEPTION_EMPTY_PATH
)public SubArrayRequest(String key, String path, SubArrayRequest.ArrayOperation arrayOp, ByteBuf fragment, String bucket)
Creates a new SubArrayRequest
of type arrayOp.
key
- the key of the document.path
- the subdocument path to consider inside the document.arrayOp
- the specific SubArrayRequest.ArrayOperation
to perform.fragment
- the fragment of valid JSON to mutate into at the site denoted by the path.bucket
- the bucket of the document.NullPointerException
- if the path is null (see AbstractSubdocRequest.EXCEPTION_NULL_PATH
)IllegalArgumentException
- if the operation is SubArrayRequest.ArrayOperation.INSERT
and path is empty (see AbstractSubdocRequest.EXCEPTION_EMPTY_PATH
)public byte opcode()
KeyValueHandler.OP_SUB_GET and other OP_SUB_ constants for the list of opcodes
public SubArrayRequest.ArrayOperation arrayOperation()
SubArrayRequest.ArrayOperation
this request describes.Copyright © 2016 Couchbase, Inc.. All rights reserved.