Package com.couchbase.client.core.msg.kv
Class ReplicaGetRequest
java.lang.Object
com.couchbase.client.core.msg.BaseRequest<R>
com.couchbase.client.core.msg.kv.BaseKeyValueRequest<GetResponse>
com.couchbase.client.core.msg.kv.GetRequest
com.couchbase.client.core.msg.kv.ReplicaGetRequest
- All Implemented Interfaces:
KeyValueRequest<GetResponse>
,Request<GetResponse>
,ScopedRequest
-
Constructor Summary
ConstructorDescriptionReplicaGetRequest
(String key, Duration timeout, CoreContext ctx, CollectionIdentifier collectionIdentifier, RetryStrategy retryStrategy, short replica, RequestSpan span) -
Method Summary
Modifier and TypeMethodDescriptioncom.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.name()
The unique name of the request, usually related to the type but not necessarily.short
replica()
Returns contextual information for each individual service.Methods inherited from class com.couchbase.client.core.msg.kv.GetRequest
decode, idempotent
Methods inherited from class com.couchbase.client.core.msg.kv.BaseKeyValueRequest
bucket, collectionIdentifier, encodedExternalKeyWithCollection, encodedKeyWithCollection, errorCode, indicateRejectedWithNotMyVbucket, key, nextOpaque, opaque, operationId, partition, partition, rejectedWithNotMyVbucket, serviceType
Methods inherited from class com.couchbase.client.core.msg.BaseRequest
absoluteTimeout, cancel, cancellationReason, cancelled, completed, context, createdAt, fail, failed, id, requestSpan, response, retryStrategy, succeed, succeeded, timeout, timeoutElapsed, timeoutRegistration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.couchbase.client.core.msg.Request
absoluteTimeout, cancel, cancel, cancellationReason, cancelled, completed, context, createdAt, fail, failed, id, requestSpan, response, retryStrategy, succeed, succeeded, target, timeout, timeoutElapsed, timeoutRegistration
-
Constructor Details
-
ReplicaGetRequest
public ReplicaGetRequest(String key, Duration timeout, CoreContext ctx, CollectionIdentifier collectionIdentifier, RetryStrategy retryStrategy, short replica, RequestSpan span)
-
-
Method Details
-
replica
public short replica() -
encode
public com.couchbase.client.core.deps.io.netty.buffer.ByteBuf encode(com.couchbase.client.core.deps.io.netty.buffer.ByteBufAllocator alloc, int opaque, KeyValueChannelContext ctx) Description copied from interface:KeyValueRequest
Encode this request with the given allocator and opaque.- Specified by:
encode
in interfaceKeyValueRequest<GetResponse>
- Overrides:
encode
in classGetRequest
- 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
.
-
serviceContext
Description copied from interface:Request
Returns contextual information for each individual service.- Specified by:
serviceContext
in interfaceRequest<GetResponse>
- Overrides:
serviceContext
in classBaseKeyValueRequest<GetResponse>
- Returns:
- the service context.
-
name
Description copied from interface:Request
The unique name of the request, usually related to the type but not necessarily.The default implementation is derived from the class name (i.e. FooRequest returns foo), but if that does not match up it should be overridden in the actual class.
- Specified by:
name
in interfaceRequest<GetResponse>
- Overrides:
name
in classGetRequest
- Returns:
- the name of the request type.
-