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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProtostellarRequest(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 TypeMethodDescriptionlongcancel(CancellationReason reason) booleancontext()longcom.couchbase.client.core.deps.io.grpc.Deadlinedeadline()voiddispatchDuration(long durationNanos) booleanfailed()voidincrementRetryAttempts(Duration duration, RetryReason reason) longvoidCrucial to always ultimately call this on every request, and just once.booleanreadonly()request()intspan()booleantimeout()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()
-