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.ByteBufencode(com.couchbase.client.core.deps.io.netty.buffer.ByteBufAllocator alloc, int opaque, KeyValueChannelContext ctx)Encode this request with the given allocator and opaque.Stringname()The unique name of the request, usually related to the type but not necessarily.shortreplica()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:KeyValueRequestEncode this request with the given allocator and opaque.- Specified by:
encodein interfaceKeyValueRequest<GetResponse>- Overrides:
encodein 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:RequestReturns contextual information for each individual service.- Specified by:
serviceContextin interfaceRequest<GetResponse>- Overrides:
serviceContextin classBaseKeyValueRequest<GetResponse>- Returns:
- the service context.
-
name
public String name()
Description copied from interface:RequestThe 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:
namein interfaceRequest<GetResponse>- Overrides:
namein classGetRequest- Returns:
- the name of the request type.
-
-