public class RetryExecutor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RetryExecutor.GiveupAction |
static interface |
RetryExecutor.RetryAction |
static class |
RetryExecutor.RetryGiveupException |
static interface |
RetryExecutor.RetryPredicate |
| Modifier and Type | Method and Description |
|---|---|
RetryExecutor |
onGiveup(RetryExecutor.GiveupAction function) |
RetryExecutor |
onRetry(RetryExecutor.RetryAction function) |
static RetryExecutor |
retryExecutor() |
RetryExecutor |
retryIf(RetryExecutor.RetryPredicate function) |
<T> T |
run(java.util.concurrent.Callable<T> op) |
void |
run(java.lang.Runnable op) |
<T> T |
runInterruptible(java.util.concurrent.Callable<T> op) |
void |
runInterruptible(java.lang.Runnable op) |
RetryExecutor |
withInitialRetryWait(int msec) |
RetryExecutor |
withMaxRetryWait(int msec) |
RetryExecutor |
withRetryLimit(int count) |
RetryExecutor |
withWaitGrowRate(double rate) |
public static RetryExecutor retryExecutor()
public RetryExecutor withRetryLimit(int count)
public RetryExecutor withInitialRetryWait(int msec)
public RetryExecutor withMaxRetryWait(int msec)
public RetryExecutor withWaitGrowRate(double rate)
public RetryExecutor retryIf(RetryExecutor.RetryPredicate function)
public RetryExecutor onRetry(RetryExecutor.RetryAction function)
public RetryExecutor onGiveup(RetryExecutor.GiveupAction function)
public <T> T runInterruptible(java.util.concurrent.Callable<T> op)
throws java.lang.InterruptedException,
RetryExecutor.RetryGiveupException
java.lang.InterruptedExceptionRetryExecutor.RetryGiveupExceptionpublic void runInterruptible(java.lang.Runnable op)
throws java.lang.InterruptedException,
RetryExecutor.RetryGiveupException
java.lang.InterruptedExceptionRetryExecutor.RetryGiveupExceptionpublic <T> T run(java.util.concurrent.Callable<T> op)
throws RetryExecutor.RetryGiveupException
public void run(java.lang.Runnable op)
throws RetryExecutor.RetryGiveupException