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
public class ReplicaGetRequest extends GetRequest
-
-
Constructor Summary
Constructors Constructor Description ReplicaGetRequest(String key, Duration timeout, CoreContext ctx, CollectionIdentifier collectionIdentifier, RetryStrategy retryStrategy, short replica, RequestSpan span)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.String
name()
The unique name of the request, usually related to the type but not necessarily.short
replica()
Map<String,Object>
serviceContext()
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 Detail
-
ReplicaGetRequest
public ReplicaGetRequest(String key, Duration timeout, CoreContext ctx, CollectionIdentifier collectionIdentifier, RetryStrategy retryStrategy, short replica, RequestSpan span)
-
-
Method Detail
-
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
public Map<String,Object> 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
public String 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 => 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.
-
-