Class Tasks.Builder<I>

  • Enclosing class:
    Tasks

    public static class Tasks.Builder<I>
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder​(java.lang.Iterable<I> items)
    • Method Detail

      • executeWith

        public Tasks.Builder<I> executeWith​(java.util.concurrent.ExecutorService svc)
      • throwFailureWhenFinished

        public Tasks.Builder<I> throwFailureWhenFinished()
      • throwFailureWhenFinished

        public Tasks.Builder<I> throwFailureWhenFinished​(boolean throwWhenFinished)
      • suppressFailureWhenFinished

        public Tasks.Builder<I> suppressFailureWhenFinished()
      • stopRevertsOnFailure

        public Tasks.Builder<I> stopRevertsOnFailure()
      • 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)
      • 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)
      • 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