Interface CouchbaseRequest

All Superinterfaces:
All Known Subinterfaces:
AnalyticsRequest, BinaryRequest, BinaryStoreRequest, BinarySubdocMultiLookupRequest, BinarySubdocMultiMutationRequest, BinarySubdocMutationRequest, BinarySubdocRequest, ClusterRequest, ConfigRequest, InternalRequest, PrelocatedRequest, QueryRequest, SearchRequest, ViewRequest
All Known Implementing Classes:
AbstractCouchbaseRequest, AbstractKeyValueRequest, AbstractSubdocMutationRequest, AbstractSubdocRequest, AddNodeRequest, AddServiceRequest, AnalyticsHandler.KeepAliveRequest, AnalyticsHandlerV2.KeepAliveRequest, AnalyticsQueryResultRequest, AnalyticsQueryStatusRequest, AppendRequest, BucketConfigRequest, BucketsConfigRequest, BucketStreamingRequest, CloseBucketRequest, ClusterConfigRequest, CounterRequest, DiagnosticsRequest, DisconnectRequest, FlushRequest, GenericAnalyticsRequest, GenericQueryRequest, GetAllMutationTokensRequest, GetBucketConfigRequest, GetClusterConfigRequest, GetConfigProviderRequest, GetDesignDocumentRequest, GetDesignDocumentsRequest, GetRequest, GetSearchIndexRequest, GetUsersRequest, InsertBucketRequest, InsertRequest, KeyValueHandler.KeepAliveRequest, NoopRequest, ObserveRequest, ObserveSeqnoRequest, OpenBucketRequest, PingRequest, PingRequest, PingRequest, PingRequest, PrependRequest, QueryHandler.KeepAliveRequest, QueryHandlerV2.KeepAliveRequest, RawAnalyticsRequest, RawQueryRequest, RemoveBucketRequest, RemoveDesignDocumentRequest, RemoveNodeRequest, RemoveRequest, RemoveSearchIndexRequest, RemoveServiceRequest, RemoveUserRequest, ReplaceRequest, ReplicaGetRequest, RestApiRequest, SearchHandler.KeepAliveRequest, SearchQueryRequest, SeedNodesRequest, SignalConfigReload, SignalFlush, StatRequest, SubArrayRequest, SubCounterRequest, SubDeleteRequest, SubDictAddRequest, SubDictUpsertRequest, SubExistRequest, SubGetCountRequest, SubGetRequest, SubMultiLookupRequest, SubMultiMutationRequest, SubReplaceRequest, TouchRequest, UnlockRequest, UpdateBucketRequest, UpsertDesignDocumentRequest, UpsertRequest, UpsertSearchIndexRequest, UpsertUserRequest, ViewHandler.KeepAliveRequest, ViewQueryRequest

public interface CouchbaseRequest
extends CouchbaseMessage
High-Level marker interface for all CouchbaseRequests.
Michael Nitschinger
  • Method Details

    • observable

      rx.subjects.Subject<CouchbaseResponse,​CouchbaseResponse> observable()
      Get the underlying Observable.
      the observable which will complete the response.
    • emit

      void emit​(CouchbaseResponse response)
      Emits the CouchbaseResponse into the underlying state holder (like a subject) without completing it as per contract.
      response - the response to emit.
    • complete

      void complete()
      Completes the underlying state holder.
    • succeed

      void succeed​(CouchbaseResponse response)
      Emits the CouchbaseResponse into the underlying state holder (like a subject) and completes it as well per contract. Its basically a shortcut for emit(CouchbaseResponse) followed by complete().
      response - the response to emit and complete.
    • fail

      void fail​(Throwable throwable)
      Fails the CouchbaseResponse on the state holder as per contract.
      throwable - the throwable to fail the response with.
    • bucket

      String bucket()
      The associated bucket name for this request.
      the bucket name.
    • username

      String username()
      User authorized for bucket access
    • password

      String password()
      The password associated with the bucket/ user
      the password.
    • incrementRetryCount

      int incrementRetryCount()
      Returns the old retry count and increments it by one.
      the old retryCount.
    • retryCount

      int retryCount()
      Returns the current retry count.
      the current retry count.
    • retryAfter

      void retryAfter​(long after)
      Sets the initial retry after time for the request.
      after -
    • retryAfter

      long retryAfter()
      Gets the initial retry after time for the request.
    • maxRetryDuration

      void maxRetryDuration​(long duration)
      Sets the maximum retry duration for the request.
      duration -
    • maxRetryDuration

      long maxRetryDuration()
      Returns the maximum retry duration for the request.
    • retryDelay

      void retryDelay​(Delay delay)
      Sets the retry delay config
      delay -
    • retryDelay

      Delay retryDelay()
      Returns the retry delay config
    • isActive

      @Private @Uncommitted boolean isActive()
      Checks if the request is unsubscribed on a timeout
      false if timed out, else true
    • subscriber

      @Private @Uncommitted void subscriber​(rx.Subscriber subscriber)
      Optionally add subscriber to check for the timeouts
    • dispatchHostname

      String dispatchHostname()
    • dispatchHostname

      void dispatchHostname​(String hostname)
    • span

      io.opentracing.Span span()
      Returns the Span for this request if set.
      the span used.
    • span

      void span​(io.opentracing.Span span, CoreEnvironment env)
      Allows to set a custom span that should be used.
      span - the span to use.
      env - the core env used for context-sensitive stuff, may be null.
    • operationId

      String operationId()
      A unique operation id, used for tracing purposes. May or may not be null depending on the service implementation.
      the operation id or null.
    • lastLocalSocket

      String lastLocalSocket()
    • lastRemoteSocket

      String lastRemoteSocket()
    • lastLocalId

      String lastLocalId()
    • lastLocalSocket

      void lastLocalSocket​(String local)
    • lastRemoteSocket

      void lastRemoteSocket​(String remote)
    • lastLocalId

      void lastLocalId​(String localId)