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, PredeterminedPartitionRequest, PrependRequest, RangeScanCancelRequest, RangeScanContinueRequest, RangeScanCreateRequest, RemoveRequest, ReplaceRequest, ReplicaGetRequest, ReplicaSubdocGetRequest, SubdocGetRequest, SubdocMutateRequest, TouchRequest, UnlockRequest, UpsertRequest

public interface KeyValueRequest<R extends Response> extends Request<R>, ScopedRequest
Main parent interface for all Key/Value requests.
  • Method Details

    • 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.
      partition - the partition to set.
    • encode encode( alloc, int opaque, KeyValueChannelContext ctx)
      Encode this request with the given allocator and opaque.
      alloc - the allocator where to grab the buffers from.
      opaque - the opaque value to use.
      ctx - more encode context.
      the encoded request as a ByteBuf.
    • decode

      R decode( response, KeyValueChannelContext ctx)
      Decode the encoded response into its message representation.
      response - the response to decode.
      the decoded response as the generic type R.
    • key

      byte[] key()
      The key of the kv request.
      the key of the request.
    • collectionIdentifier

      CollectionIdentifier collectionIdentifier()
    • opaque

      int opaque()
    • rejectedWithNotMyVbucket

      int rejectedWithNotMyVbucket()
      Returns the number of times this request has been rejected with a not my vbucket response before.
    • indicateRejectedWithNotMyVbucket

      void indicateRejectedWithNotMyVbucket()
      Increments the counter indicating that this request has been rejected with a not my vbucket response.
    • errorCode

      void errorCode(ErrorMap.ErrorCode errorCode)
      Sets the error code on the request for debugging purposes.
      errorCode - the error code to set for the request.