org.apache.hadoop.hbase.client
Class RpcRetryingCaller<T>
java.lang.Object
org.apache.hadoop.hbase.client.RpcRetryingCaller<T>
- Direct Known Subclasses:
- StatsTrackingRpcRetryingCaller
@InterfaceAudience.Private
public class RpcRetryingCaller<T>
- extends Object
Dynamic rather than static so can set the generic return type appropriately.
|
Constructor Summary |
RpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RpcRetryingCaller
public RpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt)
callWithRetries
public T callWithRetries(RetryingCallable<T> callable)
throws IOException,
RuntimeException
- Throws:
IOException
RuntimeException
callWithRetries
public T callWithRetries(RetryingCallable<T> callable,
int callTimeout)
throws IOException,
RuntimeException
- Retries if invocation fails.
- Parameters:
callTimeout - Timeout for this callcallable - The RetryingCallable to run.
- Returns:
- an object of type T
- Throws:
IOException - if a remote or network exception occurs
RuntimeException - other unspecified error
callWithoutRetries
public T callWithoutRetries(RetryingCallable<T> callable,
int callTimeout)
throws IOException,
RuntimeException
- Call the server once only.
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).
- Returns:
- an object of type T
- Throws:
IOException - if a remote or network exception occurs
RuntimeException - other unspecified error
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.