Package org.apache.iceberg.util
Class Tasks.Builder<I>
- java.lang.Object
-
- org.apache.iceberg.util.Tasks.Builder<I>
-
- Enclosing class:
- Tasks
public static class Tasks.Builder<I> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tasks.Builder<I>
abortWith(Tasks.Task<I,?> task)
Tasks.Builder<I>
countAttempts(Counter counter)
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> exception)
Tasks.Builder<I>
onlyRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions)
Tasks.Builder<I>
retry(int nTimes)
Tasks.Builder<I>
revertWith(Tasks.Task<I,?> task)
<E extends java.lang.Exception>
booleanrun(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)
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.Iterable<I> items)
-
-
Method Detail
-
executeWith
public Tasks.Builder<I> executeWith(java.util.concurrent.ExecutorService svc)
-
onFailure
public Tasks.Builder<I> onFailure(Tasks.FailureTask<I,?> task)
-
stopOnFailure
public Tasks.Builder<I> stopOnFailure()
-
throwFailureWhenFinished
public Tasks.Builder<I> throwFailureWhenFinished()
-
throwFailureWhenFinished
public Tasks.Builder<I> throwFailureWhenFinished(boolean throwWhenFinished)
-
suppressFailureWhenFinished
public Tasks.Builder<I> suppressFailureWhenFinished()
-
revertWith
public Tasks.Builder<I> revertWith(Tasks.Task<I,?> task)
-
stopRevertsOnFailure
public Tasks.Builder<I> stopRevertsOnFailure()
-
abortWith
public Tasks.Builder<I> abortWith(Tasks.Task<I,?> task)
-
stopAbortsOnFailure
public Tasks.Builder<I> stopAbortsOnFailure()
-
stopRetryOn
@SafeVarargs public final Tasks.Builder<I> stopRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions)
-
shouldRetryTest
public Tasks.Builder<I> shouldRetryTest(java.util.function.Predicate<java.lang.Exception> shouldRetry)
-
noRetry
public Tasks.Builder<I> noRetry()
-
retry
public Tasks.Builder<I> retry(int nTimes)
-
onlyRetryOn
public Tasks.Builder<I> onlyRetryOn(java.lang.Class<? extends java.lang.Exception> exception)
-
onlyRetryOn
@SafeVarargs public final Tasks.Builder<I> onlyRetryOn(java.lang.Class<? extends java.lang.Exception>... exceptions)
-
countAttempts
public Tasks.Builder<I> countAttempts(Counter counter)
-
exponentialBackoff
public Tasks.Builder<I> exponentialBackoff(long backoffMinSleepTimeMs, long backoffMaxSleepTimeMs, long backoffMaxRetryTimeMs, double backoffScaleFactor)
-
run
public boolean run(Tasks.Task<I,java.lang.RuntimeException> task)
-
run
public <E extends java.lang.Exception> boolean run(Tasks.Task<I,E> task, java.lang.Class<E> exceptionClass) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
-