Class ProtostellarRequest<TGrpcRequest>
java.lang.Object
com.couchbase.client.core.protostellar.ProtostellarRequest<TGrpcRequest>
- Direct Known Subclasses:
ProtostellarCollectionManagerRequest
,ProtostellarKeyValueRequest
Holds onto a GRPC request, along with pertaining mutable and immutable state bound to the request's lifetime.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionProtostellarRequest
(TGrpcRequest request, CoreProtostellar core, ServiceType serviceType, String requestName, RequestSpan span, Duration timeout, boolean readonly, RetryStrategy retryStrategy, Map<String, Object> clientContext, long encodeDurationNanos, Consumer<Map<String, Object>> contextSupplier) -
Method Summary
Modifier and TypeMethodDescriptionlong
cancel
(CancellationReason reason) boolean
context()
long
com.couchbase.client.core.deps.io.grpc.Deadline
deadline()
void
dispatchDuration
(long durationNanos) boolean
failed()
void
incrementRetryAttempts
(Duration duration, RetryReason reason) long
void
Crucial to always ultimately call this on every request, and just once.boolean
readonly()
request()
int
span()
boolean
timeout()
boolean
-
Field Details
-
serviceType
-
-
Constructor Details
-
ProtostellarRequest
public ProtostellarRequest(TGrpcRequest request, CoreProtostellar core, ServiceType serviceType, String requestName, RequestSpan span, Duration timeout, boolean readonly, RetryStrategy retryStrategy, Map<String, Object> clientContext, long encodeDurationNanos, @Nullable Consumer<Map<String, Object>> contextSupplier)
-
-
Method Details
-
request
-
span
-
raisedResponseToUser
Crucial to always ultimately call this on every request, and just once. -
timeout
-
deadline
public com.couchbase.client.core.deps.io.grpc.Deadline deadline() -
absoluteTimeout
public long absoluteTimeout() -
retryStrategy
-
timeoutElapsed
public boolean timeoutElapsed() -
cancel
-
readonly
public boolean readonly() -
logicalRequestLatency
public long logicalRequestLatency() -
incrementRetryAttempts
-
context
-
retryAttempts
public int retryAttempts() -
dispatchDuration
public void dispatchDuration(long durationNanos) -
completed
public boolean completed() -
createdAt
public long createdAt() -
serviceType
-
cancellationReason
-
failed
public boolean failed() -
succeeded
public boolean succeeded()
-