Package com.couchbase.client.core.msg.kv
Interface KeyValueRequest<R extends Response>
-
- Type Parameters:
R
- the generic type of the response.
- All Superinterfaces:
Request<R>
,ScopedRequest
- All Known Implementing Classes:
AppendRequest
,BaseKeyValueRequest
,CarrierBucketConfigRequest
,CarrierGlobalConfigRequest
,DecrementRequest
,GetAndLockRequest
,GetAndTouchRequest
,GetCollectionIdRequest
,GetCollectionManifestRequest
,GetMetaRequest
,GetRequest
,IncrementRequest
,InsertRequest
,KvPingRequest
,MultiObserveViaCasRequest
,NoopRequest
,ObserveViaCasRequest
,ObserveViaSeqnoRequest
,PrependRequest
,RemoveRequest
,ReplaceRequest
,ReplicaGetRequest
,SubdocGetRequest
,SubdocMutateRequest
,TouchRequest
,UnlockRequest
,UpsertRequest
public interface KeyValueRequest<R extends Response> extends Request<R>, ScopedRequest
Main parent interface for all Key/Value requests.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CollectionIdentifier
collectionIdentifier()
R
decode(com.couchbase.client.core.deps.io.netty.buffer.ByteBuf response, KeyValueChannelContext ctx)
Decode the encoded response into its message representation.com.couchbase.client.core.deps.io.netty.buffer.ByteBuf
encode(com.couchbase.client.core.deps.io.netty.buffer.ByteBufAllocator alloc, int opaque, KeyValueChannelContext ctx)
Encode this request with the given allocator and opaque.byte[]
key()
The key of the kv request.int
opaque()
short
partition()
Reads the currently set partition this request is targeted against.void
partition(short partition)
Allows to set the partition used for this request.-
Methods inherited from interface com.couchbase.client.core.msg.Request
absoluteTimeout, cancel, cancellationReason, cancelled, completed, context, createdAt, fail, failed, id, idempotent, internalSpan, operationId, response, retryStrategy, serviceContext, serviceType, succeed, succeeded, timeout, timeoutElapsed
-
Methods inherited from interface com.couchbase.client.core.msg.ScopedRequest
bucket
-
-
-
-
Method Detail
-
partition
short partition()
Reads the currently set partition this request is targeted against.
-
partition
void partition(short partition)
Allows to set the partition used for this request.- Parameters:
partition
- the partition to set.
-
encode
com.couchbase.client.core.deps.io.netty.buffer.ByteBuf encode(com.couchbase.client.core.deps.io.netty.buffer.ByteBufAllocator alloc, int opaque, KeyValueChannelContext ctx)
Encode this request with the given allocator and opaque.- Parameters:
alloc
- the allocator where to grab the buffers from.opaque
- the opaque value to use.ctx
- more encode context.- Returns:
- the encoded request as a
ByteBuf
.
-
decode
R decode(com.couchbase.client.core.deps.io.netty.buffer.ByteBuf response, KeyValueChannelContext ctx)
Decode the encoded response into its message representation.- Parameters:
response
- the response to decode.- Returns:
- the decoded response as the generic type R.
-
key
byte[] key()
The key of the kv request.- Returns:
- the key of the request.
-
collectionIdentifier
CollectionIdentifier collectionIdentifier()
-
opaque
int opaque()
-
-