public static class Tasks.Builder<I>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Tasks.Builder<I> |
abortWith(Tasks.Task<I,?> task) |
Tasks.Builder<I> |
executeWith(java.util.concurrent.ExecutorService svc) |
Tasks.Builder<I> |
exponentialBackoff(long backoffMinSleepTimeMs,
long backoffMaxSleepTimeMs,
long backoffMaxRetryTimeMs,
double backoffScaleFactor) |
Tasks.Builder<I> |
noRetry() |
Tasks.Builder<I> |
onFailure(Tasks.FailureTask<I,?> task) |
Tasks.Builder<I> |
onlyRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions) |
Tasks.Builder<I> |
onlyRetryOn(java.lang.Class<? extends java.lang.Exception> exception) |
Tasks.Builder<I> |
retry(int nTimes) |
Tasks.Builder<I> |
revertWith(Tasks.Task<I,?> task) |
<E extends java.lang.Exception> |
run(Tasks.Task<I,E> task,
java.lang.Class<E> exceptionClass) |
boolean |
run(Tasks.Task<I,java.lang.RuntimeException> task) |
Tasks.Builder<I> |
shouldRetryTest(java.util.function.Predicate<java.lang.Exception> shouldRetry) |
Tasks.Builder<I> |
stopAbortsOnFailure() |
Tasks.Builder<I> |
stopOnFailure() |
Tasks.Builder<I> |
stopRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions) |
Tasks.Builder<I> |
stopRevertsOnFailure() |
Tasks.Builder<I> |
suppressFailureWhenFinished() |
Tasks.Builder<I> |
throwFailureWhenFinished() |
Tasks.Builder<I> |
throwFailureWhenFinished(boolean throwWhenFinished) |
public Builder(java.lang.Iterable<I> items)
public Tasks.Builder<I> executeWith(java.util.concurrent.ExecutorService svc)
public Tasks.Builder<I> onFailure(Tasks.FailureTask<I,?> task)
public Tasks.Builder<I> stopOnFailure()
public Tasks.Builder<I> throwFailureWhenFinished()
public Tasks.Builder<I> throwFailureWhenFinished(boolean throwWhenFinished)
public Tasks.Builder<I> suppressFailureWhenFinished()
public Tasks.Builder<I> revertWith(Tasks.Task<I,?> task)
public Tasks.Builder<I> stopRevertsOnFailure()
public Tasks.Builder<I> abortWith(Tasks.Task<I,?> task)
public Tasks.Builder<I> stopAbortsOnFailure()
@SafeVarargs public final Tasks.Builder<I> stopRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions)
public Tasks.Builder<I> shouldRetryTest(java.util.function.Predicate<java.lang.Exception> shouldRetry)
public Tasks.Builder<I> noRetry()
public Tasks.Builder<I> retry(int nTimes)
public Tasks.Builder<I> onlyRetryOn(java.lang.Class<? extends java.lang.Exception> exception)
@SafeVarargs public final Tasks.Builder<I> onlyRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions)
public Tasks.Builder<I> exponentialBackoff(long backoffMinSleepTimeMs, long backoffMaxSleepTimeMs, long backoffMaxRetryTimeMs, double backoffScaleFactor)
public boolean run(Tasks.Task<I,java.lang.RuntimeException> task)
public <E extends java.lang.Exception> boolean run(Tasks.Task<I,E> task, java.lang.Class<E> exceptionClass) throws E extends java.lang.Exception
E extends java.lang.Exception