T - Result class from calls to the delegate RetryingCallableD - Type of the delegate class@InterfaceAudience.Private public class DelegatingRetryingCallable<T,D extends RetryingCallable<T>> extends Object implements RetryingCallable<T>
RetryingCallable. By default, this just delegates all RetryingCallable methods to the
specified delegate.| 构造器和说明 |
|---|
DelegatingRetryingCallable(D delegate) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
call(int callTimeout)
Computes a result, or throws an exception if unable to do so.
|
String |
getExceptionMessageAdditionalDetail() |
void |
prepare(boolean reload)
Prepare by setting up any connections to servers, etc., ahead of
RetryingCallable.call(int) invocation. |
long |
sleep(long pause,
int tries) |
void |
throwable(Throwable t,
boolean retrying)
Called when
RetryingCallable.call(int) throws an exception and we are going to retry; take action to
make it so we succeed on next call (clear caches, do relookup of locations, etc.). |
protected final D extends RetryingCallable<T> delegate
public DelegatingRetryingCallable(D delegate)
public T call(int callTimeout) throws Exception
RetryingCallablecall 在接口中 RetryingCallable<T>callTimeout - - the time available for this call. 0 for infinite.Exception - if unable to compute a resultpublic void prepare(boolean reload)
throws IOException
RetryingCallableRetryingCallable.call(int) invocation.prepare 在接口中 RetryingCallable<T>reload - Set this to true if need to requery locationsIOException - epublic void throwable(Throwable t, boolean retrying)
RetryingCallableRetryingCallable.call(int) throws an exception and we are going to retry; take action to
make it so we succeed on next call (clear caches, do relookup of locations, etc.).throwable 在接口中 RetryingCallable<T>retrying - True if we are in retrying mode (we are not in retrying mode when max
retries == 1; we ARE in retrying mode if retries > 1 even when we are the last attempt)public String getExceptionMessageAdditionalDetail()
getExceptionMessageAdditionalDetail 在接口中 RetryingCallable<T>public long sleep(long pause,
int tries)
sleep 在接口中 RetryingCallable<T>Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.