public interface Retryer
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(java.util.concurrent.Callable<T> callable)
Executes a
Callable with the context of the retry. |
void |
run(CheckedRunnable runnable)
Executes a
CheckedRunnable with the context of the retry. |
<T> Retryer |
withRetryIf(java.util.function.Predicate<T> predicate)
Optional predicates to be compared against the result of the "get" result of a retry.
|
Retryer |
withRetryOn(java.util.function.Predicate<java.lang.Throwable> throwablePredicate)
Optional predicates to be evaluated before the retryer implementation runs a retry
|
<T> T get(java.util.concurrent.Callable<T> callable)
Callable with the context of the retry. If the callable throws any exception, then the retryer
will handle that according with the configuration the retryer was created.callable - void run(CheckedRunnable runnable)
CheckedRunnable with the context of the retry. If the CheckedRunnable throws any
exception, then the
retryer will handle that according with the configuration the retryer was created.runnable - Retryer withRetryOn(java.util.function.Predicate<java.lang.Throwable> throwablePredicate)
throwablePredicate - <T> Retryer withRetryIf(java.util.function.Predicate<T> predicate)
predicate - Predicate to verify against the result of the retry.