@InterfaceAudience.Private public class RpcRetryingCallerImpl<T> extends Object implements RpcRetryingCaller<T>
RetryingCallable
. Sets into rpc client
threadlocal outstanding timeouts as so we don't persist too much.
Dynamic rather than static so can set the generic appropriately.
This object has a state. It should not be used by in parallel by different threads.
Reusing it is possible however, even between multiple threads. However, the user will
have to manage the synchronization on its side: there is no synchronization inside the class.限定符和类型 | 字段和说明 |
---|---|
static org.slf4j.Logger |
LOG |
构造器和说明 |
---|
RpcRetryingCallerImpl(long pause,
long pauseForCQTBE,
int retries,
int startLogErrorsCnt) |
RpcRetryingCallerImpl(long pause,
long pauseForCQTBE,
int retries,
org.apache.hadoop.hbase.client.RetryingCallerInterceptor interceptor,
int startLogErrorsCnt,
int rpcTimeout) |
限定符和类型 | 方法和说明 |
---|---|
T |
callWithoutRetries(RetryingCallable<T> callable,
int callTimeout)
Call the server once only.
|
T |
callWithRetries(RetryingCallable<T> callable,
int callTimeout)
Retries if invocation fails.
|
void |
cancel() |
String |
toString() |
public RpcRetryingCallerImpl(long pause, long pauseForCQTBE, int retries, int startLogErrorsCnt)
public RpcRetryingCallerImpl(long pause, long pauseForCQTBE, int retries, org.apache.hadoop.hbase.client.RetryingCallerInterceptor interceptor, int startLogErrorsCnt, int rpcTimeout)
public void cancel()
cancel
在接口中 RpcRetryingCaller<T>
public T callWithRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
RpcRetryingCaller
callWithRetries
在接口中 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 retries. Use this invocation if you
want to do a single call only (A call to RetryingCallable.call(int)
will not likely
succeed).callWithoutRetries
在接口中 RpcRetryingCaller<T>
IOException
- if a remote or network exception occursRuntimeException
- other unspecified errorCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.