Interface BinarySubdocRequest
-
- All Superinterfaces:
BinaryRequest
,CouchbaseMessage
,CouchbaseRequest
- All Known Subinterfaces:
BinarySubdocMutationRequest
- All Known Implementing Classes:
AbstractSubdocMutationRequest
,AbstractSubdocRequest
,SubArrayRequest
,SubCounterRequest
,SubDeleteRequest
,SubDictAddRequest
,SubDictUpsertRequest
,SubExistRequest
,SubGetCountRequest
,SubGetRequest
,SubReplaceRequest
@Committed @Public public interface BinarySubdocRequest extends BinaryRequest
A type ofBinaryRequest
that deals with getting or mutating parts of a JSON document, aka a Sub-Document. The part that is to be considered is represented by thepath()
.- Since:
- 1.2
- Author:
- Simon Baslé
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuf
content()
TheByteBuf
bearing the full content for this request.byte
opcode()
String
path()
Returns the **path** inside a JSON document where values will be obtained/mutated.int
pathLength()
-
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
-
-
-
-
Method Detail
-
path
String path()
Returns the **path** inside a JSON document where values will be obtained/mutated. Some sub-document operations authorize the use of an empty path while other don't.- Returns:
- the path to work from inside the JSON document.
-
pathLength
int pathLength()
- Returns:
- the length of the path as encoded in the
content()
(can serve as an offset from 0 to find the path in the content).
-
opcode
byte opcode()
- Returns:
- the opcode of the operation
- See Also:
KeyValueHandler.OP_SUB_GET and other OP_SUB_ constants for the list of opcodes
-
content
ByteBuf content()
TheByteBuf
bearing the full content for this request. The content is at a minimum comprised of thepath()
as UTF8 bytes, and can also have any other relevant payload appended (eg. a JSON fragment for mutative operations, seeBinarySubdocMutationRequest.fragment()
). This buffer is to be automatically released once the message has been written on the wire.- Returns:
- the ByteBuf to serve as a memcached protocol message body.
-
-