public class RetryingStreamOperation<RequestT,ResponseT> extends AbstractRetryingOperation<RequestT,ResponseT,List<ResponseT>>
AbstractRetryingOperation
that aggregates all responses from a streaming
request into a List.AbstractRetryingOperation.GrpcFuture<RespT>
completionFuture, failedCount, LOG, operationSpan, operationTimerContext, retryExecutorService, retryOptions, rpc, rpcTimerContext, UNARY_DEADLINE_MINUTES
Constructor | 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.
|
Modifier and Type | Method | 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, finalizeStats, getAsyncResult, getBlockingResult, getCall, getExhaustedRetriesException, getNextBackoff, getOperationCallOptions, getRetryRequest, getRpcCallOptions, getRunnable, inRetryMode, isRequestRetryable, isStreamingRead, onClose, onError, performRetry, resetStatusBasedBackoff, setException
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.
retryOptions
- a RetryOptions
object.request
- a RequestT object.retryableRpc
- a BigtableAsyncRpc
object.callOptions
- a CallOptions
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)