@InterfaceAudience.Private public class StatsTrackingRpcRetryingCaller<T> extends RpcRetryingCaller<T>
RpcRetryingCaller
that will update the per-region stats for the call on return,
if stats are availableConstructor and Description |
---|
StatsTrackingRpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt,
ServerStatisticTracker stats) |
Modifier and Type | Method and Description |
---|---|
T |
callWithoutRetries(RetryingCallable<T> callable,
int callTimeout)
Call the server once only.
|
T |
callWithRetries(RetryingCallable<T> callable,
int callTimeout)
Retries if invocation fails.
|
callWithRetries
public StatsTrackingRpcRetryingCaller(long pause, int retries, int startLogErrorsCnt, ServerStatisticTracker stats)
public T callWithRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
RpcRetryingCaller
callWithRetries
in class RpcRetryingCaller<T>
callable
- The RetryingCallable
to run.callTimeout
- Timeout for this callIOException
- if a remote or network exception occursRuntimeException
- other unspecified errorpublic T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
RpcRetryingCaller
RetryingCallable
has a strange shape so we can do retrys. Use this invocation if you
want to do a single call only (A call to Callable.call()
will not likely
succeed).callWithoutRetries
in class RpcRetryingCaller<T>
IOException
- if a remote or network exception occursRuntimeException
- other unspecified errorCopyright © 2015 The Apache Software Foundation. All Rights Reserved.