@InternalApi(value="For internal usage only") public class RetryingStreamOperation<RequestT,ResponseT> extends AbstractRetryingOperation<RequestT,ResponseT,List<ResponseT>>
AbstractRetryingOperation
that aggregates all responses from a streaming
request into a List.
For internal use only - public for technical reasons.
AbstractRetryingOperation.GrpcFuture<RespT>
callWrapper, completionFuture, failedCount, LOG, operationSpan, operationTimerContext, retryExecutorService, retryOptions, rpc, rpcTimerContext
Constructor and Description |
---|
RetryingStreamOperation(RetryOptions retryOptions,
RequestT request,
BigtableAsyncRpc<RequestT,ResponseT> retryableRpc,
DeadlineGenerator deadlineGenerator,
ScheduledExecutorService executorService,
io.grpc.Metadata metadata,
com.google.api.core.ApiClock clock)
Constructor for RetryingCollectingClientCallListener.
|
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()
Calls
BigtableAsyncRpc.newCall(CallOptions) and BigtableAsyncRpc.start(Object,
io.grpc.ClientCall.Listener, Metadata, ClientCall) } with this as the listener so that retries
happen correctly. |
cancel, cancel, createCallController, finalizeStats, getAsyncResult, getBlockingResult, getExhaustedRetriesException, getNextBackoff, getRetryRequest, getRunnable, inRetryMode, isRequestRetryable, isStatusRetryable, onClose, onError, performRetry, resetStatusBasedBackoff, setException
public RetryingStreamOperation(RetryOptions retryOptions, RequestT request, BigtableAsyncRpc<RequestT,ResponseT> retryableRpc, DeadlineGenerator deadlineGenerator, ScheduledExecutorService executorService, io.grpc.Metadata metadata, com.google.api.core.ApiClock clock)
retryOptions
- a RetryOptions
object.request
- a RequestT object.retryableRpc
- a BigtableAsyncRpc
object.deadlineGenerator
- a DeadlineGenerator
object.executorService
- a ScheduledExecutorService
object.metadata
- a Metadata
object.clock
- a ApiClock
objectpublic void run()
BigtableAsyncRpc.newCall(CallOptions)
and BigtableAsyncRpc.start(Object,
io.grpc.ClientCall.Listener, Metadata, ClientCall)
} with this as the listener so that retries
happen correctly.public void onMessage(ResponseT message)
onMessage
in class io.grpc.ClientCall.Listener<ResponseT>
protected boolean onOK(io.grpc.Metadata trailers)