com.google.cloud.bigtable.grpc.async
Class RetryingUnaryOperation<RequestT,ResponseT>
- java.lang.Object
-
- io.grpc.ClientCall.Listener<ResponseT>
-
- com.google.cloud.bigtable.grpc.async.AbstractRetryingOperation<RequestT,ResponseT,ResponseT>
-
- com.google.cloud.bigtable.grpc.async.RetryingUnaryOperation<RequestT,ResponseT>
-
public class RetryingUnaryOperation<RequestT,ResponseT> extends AbstractRetryingOperation<RequestT,ResponseT,ResponseT>
AAbstractRetryingOperation
for a unary operation.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.cloud.bigtable.grpc.async.AbstractRetryingOperation
AbstractRetryingOperation.GrpcFuture<RespT>
-
-
Field Summary
-
Fields inherited from class com.google.cloud.bigtable.grpc.async.AbstractRetryingOperation
callWrapper, completionFuture, failedCount, LOG, operationSpan, operationTimerContext, retryExecutorService, retryOptions, rpc, rpcTimerContext, UNARY_DEADLINE_MINUTES
-
-
Constructor Summary
Constructors Constructor and Description RetryingUnaryOperation(RetryOptions retryOptions, RequestT request, BigtableAsyncRpc<RequestT,ResponseT> retryableRpc, io.grpc.CallOptions callOptions, ScheduledExecutorService executorService, io.grpc.Metadata metadata, com.google.api.core.ApiClock clock)
Constructor for RetryingUnaryRpcListener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
onMessage(ResponseT message)
protected boolean
onOK(io.grpc.Metadata trailers)
A subclass has the opportunity to perform the final operations it needs now that the RPC is successfully complete.-
Methods inherited from class com.google.cloud.bigtable.grpc.async.AbstractRetryingOperation
cancel, cancel, createCallController, finalizeStats, getAsyncResult, getBlockingResult, getExhaustedRetriesException, getNextBackoff, getOperationCallOptions, getRetryRequest, getRpcCallOptions, getRunnable, inRetryMode, isRequestRetryable, isStreamingRead, onClose, onError, performRetry, resetStatusBasedBackoff, run, setException
-
-
-
-
Constructor Detail
-
RetryingUnaryOperation
public RetryingUnaryOperation(RetryOptions retryOptions, RequestT request, BigtableAsyncRpc<RequestT,ResponseT> retryableRpc, io.grpc.CallOptions callOptions, ScheduledExecutorService executorService, io.grpc.Metadata metadata, com.google.api.core.ApiClock clock)
Constructor for RetryingUnaryRpcListener.- Parameters:
retryOptions
- aRetryOptions
object.request
- a RequestT object.retryableRpc
- aBigtableAsyncRpc
object.callOptions
- aCallOptions
object.executorService
- aScheduledExecutorService
object.metadata
- aMetadata
object.clock
- aApiClock
object
-
-
Method Detail
-
onMessage
public void onMessage(ResponseT message)
- Overrides:
onMessage
in classio.grpc.ClientCall.Listener<ResponseT>
-
onOK
protected boolean onOK(io.grpc.Metadata trailers)
A subclass has the opportunity to perform the final operations it needs now that the RPC is successfully complete. If a subclass has to retry, due to the message, this method will return false- Specified by:
onOK
in classAbstractRetryingOperation<RequestT,ResponseT,ResponseT>
- Returns:
- true if the operation was really completed.
-
-