@InterfaceAudience.Private public class RpcRetryingCaller<T> extends Object
| Constructor and Description |
|---|
RpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt) |
| Modifier and Type | Method and Description |
|---|---|
T |
callWithoutRetries(RetryingCallable<T> callable,
int callTimeout)
Call the server once only.
|
T |
callWithRetries(RetryingCallable<T> callable) |
T |
callWithRetries(RetryingCallable<T> callable,
int callTimeout)
Retries if invocation fails.
|
public RpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt)
public T callWithRetries(RetryingCallable<T> callable) throws IOException, RuntimeException
IOExceptionRuntimeExceptionpublic T callWithRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
callTimeout - Timeout for this callcallable - The RetryingCallable to run.IOException - if a remote or network exception occursRuntimeException - other unspecified errorpublic T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
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).IOException - if a remote or network exception occursRuntimeException - other unspecified errorCopyright © 2015 The Apache Software Foundation. All Rights Reserved.