public class RetryDriver extends Object
| Modifier and Type | Method and Description |
|---|---|
RetryDriver |
exceptionMapper(java.util.function.Function<Exception,Exception> exceptionMapper) |
RetryDriver |
exponentialBackoff(io.airlift.units.Duration minSleepTime,
io.airlift.units.Duration maxSleepTime,
io.airlift.units.Duration maxRetryTime,
double scaleFactor) |
RetryDriver |
maxAttempts(int maxAttempts) |
RetryDriver |
onRetry(Runnable retryRunnable) |
static RetryDriver |
retry() |
<V> V |
run(String callableName,
Callable<V> callable) |
RetryDriver |
stopOn(Class<? extends Exception>... classes) |
RetryDriver |
stopOnIllegalExceptions() |
public static RetryDriver retry()
public final RetryDriver maxAttempts(int maxAttempts)
public final RetryDriver exponentialBackoff(io.airlift.units.Duration minSleepTime, io.airlift.units.Duration maxSleepTime, io.airlift.units.Duration maxRetryTime, double scaleFactor)
public final RetryDriver onRetry(Runnable retryRunnable)
public final RetryDriver exceptionMapper(java.util.function.Function<Exception,Exception> exceptionMapper)
@SafeVarargs public final RetryDriver stopOn(Class<? extends Exception>... classes)
public RetryDriver stopOnIllegalExceptions()
Copyright © 2012-2017. All Rights Reserved.