Class ProtostellarRequest<TGrpcRequest>

java.lang.Object
com.couchbase.client.core.protostellar.ProtostellarRequest<TGrpcRequest>
Direct Known Subclasses:
ProtostellarCollectionManagerRequest, ProtostellarKeyValueRequest

@Internal public class ProtostellarRequest<TGrpcRequest> extends Object
Holds onto a GRPC request, along with pertaining mutable and immutable state bound to the request's lifetime.
  • Field Details

    • serviceType

      protected final ServiceType serviceType
  • Constructor Details

  • Method Details

    • request

      public TGrpcRequest request()
    • span

      public RequestSpan span()
    • raisedResponseToUser

      public void raisedResponseToUser(@Nullable Throwable err)
      Crucial to always ultimately call this on every request, and just once.
    • timeout

      public Duration timeout()
    • deadline

      public com.couchbase.client.core.deps.io.grpc.Deadline deadline()
    • absoluteTimeout

      public long absoluteTimeout()
    • retryStrategy

      public RetryStrategy retryStrategy()
    • timeoutElapsed

      public boolean timeoutElapsed()
    • cancel

    • readonly

      public boolean readonly()
    • logicalRequestLatency

      public long logicalRequestLatency()
    • incrementRetryAttempts

      public void incrementRetryAttempts(Duration duration, RetryReason reason)
    • context

      public GenericErrorContext context()
    • retryAttempts

      public int retryAttempts()
    • dispatchDuration

      public void dispatchDuration(long durationNanos)
    • completed

      public boolean completed()
    • createdAt

      public long createdAt()
    • serviceType

      public ServiceType serviceType()
    • cancellationReason

      @Nullable public CancellationReason cancellationReason()
    • failed

      public boolean failed()
    • succeeded

      public boolean succeeded()