com.google.cloud.bigtable.grpc.async
Class RetryingStreamOperation<RequestT,ResponseT>
- java.lang.Object
-
- io.grpc.ClientCall.Listener<ResponseT>
-
- com.google.cloud.bigtable.grpc.async.AbstractRetryingOperation<RequestT,ResponseT,List<ResponseT>>
-
- com.google.cloud.bigtable.grpc.async.RetryingStreamOperation<RequestT,ResponseT>
-
public class RetryingStreamOperation<RequestT,ResponseT> extends AbstractRetryingOperation<RequestT,ResponseT,List<ResponseT>>
An extension ofAbstractRetryingOperation
that aggregates all responses from a streaming request into a List.- 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 RetryingStreamOperation(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 RetryingCollectingClientCallListener.
-
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.void
run()
CallsBigtableAsyncRpc.newCall(CallOptions)
andBigtableAsyncRpc.start(Object, io.grpc.ClientCall.Listener, Metadata, ClientCall)
} with this as the listener so that retries happen correctly.-
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, setException
-
-
-
-
Constructor Detail
-
RetryingStreamOperation
public RetryingStreamOperation(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 RetryingCollectingClientCallListener.- 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
-
run
public void run()
CallsBigtableAsyncRpc.newCall(CallOptions)
andBigtableAsyncRpc.start(Object, io.grpc.ClientCall.Listener, Metadata, ClientCall)
} with this as the listener so that retries happen correctly.
-
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
-
-