@Stability.Internal public class ProtostellarRequest<TGrpcRequest> extends Object
Modifier and Type | Field and Description |
---|---|
protected ServiceType |
serviceType |
Constructor and Description |
---|
ProtostellarRequest(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) |
Modifier and Type | Method and Description |
---|---|
long |
absoluteTimeout() |
ProtostellarRequestBehaviour |
cancel(CancellationReason reason) |
CancellationReason |
cancellationReason() |
boolean |
completed() |
GenericErrorContext |
context() |
long |
createdAt() |
com.couchbase.client.core.deps.io.grpc.Deadline |
deadline() |
void |
dispatchDuration(long durationNanos) |
boolean |
failed() |
void |
incrementRetryAttempts(Duration duration,
RetryReason reason) |
long |
logicalRequestLatency() |
void |
raisedResponseToUser(Throwable err)
Crucial to always ultimately call this on every request, and just once.
|
boolean |
readonly() |
TGrpcRequest |
request() |
int |
retryAttempts() |
RetryStrategy |
retryStrategy() |
ServiceType |
serviceType() |
RequestSpan |
span() |
boolean |
succeeded() |
Duration |
timeout() |
boolean |
timeoutElapsed() |
protected final ServiceType serviceType
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)
public TGrpcRequest request()
public RequestSpan span()
public void raisedResponseToUser(@Nullable Throwable err)
public Duration timeout()
public com.couchbase.client.core.deps.io.grpc.Deadline deadline()
public long absoluteTimeout()
public RetryStrategy retryStrategy()
public boolean timeoutElapsed()
public ProtostellarRequestBehaviour cancel(CancellationReason reason)
public boolean readonly()
public long logicalRequestLatency()
public void incrementRetryAttempts(Duration duration, RetryReason reason)
public GenericErrorContext context()
public int retryAttempts()
public void dispatchDuration(long durationNanos)
public boolean completed()
public long createdAt()
public ServiceType serviceType()
@Nullable public CancellationReason cancellationReason()
public boolean failed()
public boolean succeeded()
Copyright © 2024 Couchbase, Inc.. All rights reserved.