V
- return typeabstract class MasterCallable<V> extends Object implements RetryingCallable<V>, Closeable
Modifier and Type | Field and Description |
---|---|
protected HConnection |
connection |
protected MasterKeepAliveConnection |
master |
Constructor and Description |
---|
MasterCallable(HConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
call
protected HConnection connection
protected MasterKeepAliveConnection master
public MasterCallable(HConnection connection)
public void prepare(boolean reload) throws IOException
RetryingCallable
RetryingCallable.call(int)
invocation.prepare
in interface RetryingCallable<V>
reload
- Set this to true if need to requery locationsIOException
- epublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void throwable(Throwable t, boolean retrying)
RetryingCallable
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.).throwable
in interface RetryingCallable<V>
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
in interface RetryingCallable<V>
public long sleep(long pause, int tries)
sleep
in interface RetryingCallable<V>
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.