Class AbstractDeferredManager

    • Constructor Detail

      • AbstractDeferredManager

        public AbstractDeferredManager()
    • Method Detail

      • submit

        protected abstract void submit​(java.lang.Runnable runnable)
      • submit

        protected abstract void submit​(java.util.concurrent.Callable callable)
      • isAutoSubmit

        public abstract boolean isAutoSubmit()
        Should Runnable or Callable be submitted for execution automatically when any of the when() method variants is invoked.
        Returns:
      • when

        public <F,​V1,​V2> Promise<MultipleResults2<V1,​V2>,​OneReject<F>,​MasterProgress> when​(Promise<V1,​?,​?> promiseV1,
                                                                                                                         Promise<V2,​?,​?> promiseV2)
        Description copied from interface: DeferredManager
        Submits 2 Promises returns a combined Promise. The combined promise signals fail as soon as any of the promises rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        F - the common type the promises may reject
        V1 - the resolve type of the first promise
        V2 - the resolve type of the second promise
        Parameters:
        promiseV1 - the first promise to be resolved
        promiseV2 - the second promise to be resolved
        Returns:
        a combined Promise
      • when

        public <F,​V1,​V2,​V3> Promise<MultipleResults3<V1,​V2,​V3>,​OneReject<F>,​MasterProgress> when​(Promise<V1,​?,​?> promiseV1,
                                                                                                                                           Promise<V2,​?,​?> promiseV2,
                                                                                                                                           Promise<V3,​?,​?> promiseV3)
        Description copied from interface: DeferredManager
        Submits 3 Promises returns a combined Promise. The combined promise signals fail as soon as any of the promises rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        F - the common type the promises may reject
        V1 - the resolve type of the first promise
        V2 - the resolve type of the second promise
        V3 - the resolve type of the third promise
        Parameters:
        promiseV1 - the first promise to be resolved
        promiseV2 - the second promise to be resolved
        promiseV3 - the third promise to be resolved
        Returns:
        a combined Promise
      • when

        public <F,​V1,​V2,​V3,​V4> Promise<MultipleResults4<V1,​V2,​V3,​V4>,​OneReject<F>,​MasterProgress> when​(Promise<V1,​?,​?> promiseV1,
                                                                                                                                                             Promise<V2,​?,​?> promiseV2,
                                                                                                                                                             Promise<V3,​?,​?> promiseV3,
                                                                                                                                                             Promise<V4,​?,​?> promiseV4)
        Description copied from interface: DeferredManager
        Submits 4 Promises returns a combined Promise. The combined promise signals fail as soon as any of the promises rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        F - the common type the promises may reject
        V1 - the resolve type of the first promise
        V2 - the resolve type of the second promise
        V3 - the resolve type of the third promise
        V4 - the resolve type of the fourth promise
        Parameters:
        promiseV1 - the first promise to be resolved
        promiseV2 - the second promise to be resolved
        promiseV3 - the third promise to be resolved
        promiseV4 - the fourth promise to be resolved
        Returns:
        a combined Promise
      • when

        public <F,​V1,​V2,​V3,​V4,​V5> Promise<MultipleResults5<V1,​V2,​V3,​V4,​V5>,​OneReject<F>,​MasterProgress> when​(Promise<V1,​?,​?> promiseV1,
                                                                                                                                                                               Promise<V2,​?,​?> promiseV2,
                                                                                                                                                                               Promise<V3,​?,​?> promiseV3,
                                                                                                                                                                               Promise<V4,​?,​?> promiseV4,
                                                                                                                                                                               Promise<V5,​?,​?> promiseV5)
        Description copied from interface: DeferredManager
        Submits 5 Promises returns a combined Promise. The combined promise signals fail as soon as any of the promises rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        F - the common type the promises may reject
        V1 - the resolve type of the first promise
        V2 - the resolve type of the second promise
        V3 - the resolve type of the third promise
        V4 - the resolve type of the fourth promise
        V5 - the resolve type of the fifth promise
        Parameters:
        promiseV1 - the first promise to be resolved
        promiseV2 - the second promise to be resolved
        promiseV3 - the third promise to be resolved
        promiseV4 - the fourth promise to be resolved
        promiseV5 - the fifth promise to be resolved
        Returns:
        a combined Promise
      • when

        public <F,​V1,​V2,​V3,​V4,​V5> Promise<MultipleResultsN<V1,​V2,​V3,​V4,​V5>,​OneReject<F>,​MasterProgress> when​(Promise<V1,​?,​?> promiseV1,
                                                                                                                                                                               Promise<V2,​?,​?> promiseV2,
                                                                                                                                                                               Promise<V3,​?,​?> promiseV3,
                                                                                                                                                                               Promise<V4,​?,​?> promiseV4,
                                                                                                                                                                               Promise<V5,​?,​?> promiseV5,
                                                                                                                                                                               Promise<?,​?,​?> promise6,
                                                                                                                                                                               Promise<?,​?,​?>... promises)
        Description copied from interface: DeferredManager
        Submits N Promises returns a combined Promise. The combined promise signals fail as soon as any of the promises rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        F - the common type the promises may reject
        V1 - the resolve type of the first promise
        V2 - the resolve type of the second promise
        V3 - the resolve type of the third promise
        V4 - the resolve type of the fourth promise
        V5 - the resolve type of the fifth promise
        Parameters:
        promiseV1 - the first promise to be resolved
        promiseV2 - the second promise to be resolved
        promiseV3 - the third promise to be resolved
        promiseV4 - the fourth promise to be resolved
        promiseV5 - the fifth promise to be resolved
        promises - additional promises to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2> Promise<MultipleResults2<V1,​V2>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Callable<V1> callableV1,
                                                                                                                                   java.util.concurrent.Callable<V2> callableV2)
        Description copied from interface: DeferredManager
        Submits 2 Callables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3> Promise<MultipleResults3<V1,​V2,​V3>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Callable<V1> callableV1,
                                                                                                                                                     java.util.concurrent.Callable<V2> callableV2,
                                                                                                                                                     java.util.concurrent.Callable<V3> callableV3)
        Description copied from interface: DeferredManager
        Submits 3 Callables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4> Promise<MultipleResults4<V1,​V2,​V3,​V4>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Callable<V1> callableV1,
                                                                                                                                                                       java.util.concurrent.Callable<V2> callableV2,
                                                                                                                                                                       java.util.concurrent.Callable<V3> callableV3,
                                                                                                                                                                       java.util.concurrent.Callable<V4> callableV4)
        Description copied from interface: DeferredManager
        Submits 4 Callables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResults5<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Callable<V1> callableV1,
                                                                                                                                                                                         java.util.concurrent.Callable<V2> callableV2,
                                                                                                                                                                                         java.util.concurrent.Callable<V3> callableV3,
                                                                                                                                                                                         java.util.concurrent.Callable<V4> callableV4,
                                                                                                                                                                                         java.util.concurrent.Callable<V5> callableV5)
        Description copied from interface: DeferredManager
        Submits 5 Callables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        V5 - the resolve type of the fifth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        callableV5 - the fifth callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResultsN<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Callable<V1> callableV1,
                                                                                                                                                                                         java.util.concurrent.Callable<V2> callableV2,
                                                                                                                                                                                         java.util.concurrent.Callable<V3> callableV3,
                                                                                                                                                                                         java.util.concurrent.Callable<V4> callableV4,
                                                                                                                                                                                         java.util.concurrent.Callable<V5> callableV5,
                                                                                                                                                                                         java.util.concurrent.Callable<?> callable6,
                                                                                                                                                                                         java.util.concurrent.Callable<?>... callables)
        Description copied from interface: DeferredManager
        Submits N Callables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        V5 - the resolve type of the fifth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        callableV5 - the fifth callable to be resolved
        callables - additional callables to be resolved
        Returns:
        a combined Promise
      • when

        public <P1,​P2> Promise<MultipleResults2<java.lang.Void,​java.lang.Void>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredRunnable<P1> runnableP1,
                                                                                                                                                           DeferredRunnable<P2> runnableP2)
        Description copied from interface: DeferredManager
        Submits 2 DeferredRunnables returns a combined Promise. The combined promise signals fail as soon as any of the runnables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        P1 - the progress type of the first runnable
        P2 - the progress type of the second runnable
        Parameters:
        runnableP1 - the first runnable to be resolved
        runnableP2 - the second runnable to be resolved
        Returns:
        a combined Promise
      • when

        public <P1,​P2,​P3> Promise<MultipleResults3<java.lang.Void,​java.lang.Void,​java.lang.Void>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredRunnable<P1> runnableP1,
                                                                                                                                                                                         DeferredRunnable<P2> runnableP2,
                                                                                                                                                                                         DeferredRunnable<P3> runnableP3)
        Description copied from interface: DeferredManager
        Submits 3 DeferredRunnables returns a combined Promise. The combined promise signals fail as soon as any of the runnables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        P1 - the progress type of the first runnable
        P2 - the progress type of the second runnable
        P3 - the progress type of the third runnable
        Parameters:
        runnableP1 - the first runnable to be resolved
        runnableP2 - the second runnable to be resolved
        runnableP3 - the third runnable to be resolved
        Returns:
        a combined Promise
      • when

        public <P1,​P2,​P3,​P4> Promise<MultipleResults4<java.lang.Void,​java.lang.Void,​java.lang.Void,​java.lang.Void>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredRunnable<P1> runnableP1,
                                                                                                                                                                                                                       DeferredRunnable<P2> runnableP2,
                                                                                                                                                                                                                       DeferredRunnable<P3> runnableP3,
                                                                                                                                                                                                                       DeferredRunnable<P4> runnableP4)
        Description copied from interface: DeferredManager
        Submits 4 DeferredRunnables returns a combined Promise. The combined promise signals fail as soon as any of the runnables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        P1 - the progress type of the first runnable
        P2 - the progress type of the second runnable
        P3 - the progress type of the third runnable
        P4 - the progress type of the fourth runnable
        Parameters:
        runnableP1 - the first runnable to be resolved
        runnableP2 - the second runnable to be resolved
        runnableP3 - the third runnable to be resolved
        runnableP4 - the fourth runnable to be resolved
        Returns:
        a combined Promise
      • when

        public <P1,​P2,​P3,​P4,​P5> Promise<MultipleResults5<java.lang.Void,​java.lang.Void,​java.lang.Void,​java.lang.Void,​java.lang.Void>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredRunnable<P1> runnableP1,
                                                                                                                                                                                                                                                     DeferredRunnable<P2> runnableP2,
                                                                                                                                                                                                                                                     DeferredRunnable<P3> runnableP3,
                                                                                                                                                                                                                                                     DeferredRunnable<P4> runnableP4,
                                                                                                                                                                                                                                                     DeferredRunnable<P5> runnableP5)
        Description copied from interface: DeferredManager
        Submits 5 DeferredRunnables returns a combined Promise. The combined promise signals fail as soon as any of the runnables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        P1 - the progress type of the first runnable
        P2 - the progress type of the second runnable
        P3 - the progress type of the third runnable
        P4 - the progress type of the fourth runnable
        P5 - the progress type of the fifth runnable
        Parameters:
        runnableP1 - the first runnable to be resolved
        runnableP2 - the second runnable to be resolved
        runnableP3 - the third runnable to be resolved
        runnableP4 - the fourth runnable to be resolved
        runnableP5 - the fifth runnable to be resolved
        Returns:
        a combined Promise
      • when

        public <P1,​P2,​P3,​P4,​P5> Promise<MultipleResultsN<java.lang.Void,​java.lang.Void,​java.lang.Void,​java.lang.Void,​java.lang.Void>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredRunnable<P1> runnableP1,
                                                                                                                                                                                                                                                     DeferredRunnable<P2> runnableP2,
                                                                                                                                                                                                                                                     DeferredRunnable<P3> runnableP3,
                                                                                                                                                                                                                                                     DeferredRunnable<P4> runnableP4,
                                                                                                                                                                                                                                                     DeferredRunnable<P5> runnableP5,
                                                                                                                                                                                                                                                     DeferredRunnable<?> runnable6,
                                                                                                                                                                                                                                                     DeferredRunnable<?>... runnables)
        Description copied from interface: DeferredManager
        Submits N DeferredRunnables returns a combined Promise. The combined promise signals fail as soon as any of the runnables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        P1 - the progress type of the first runnable
        P2 - the progress type of the second runnable
        P3 - the progress type of the third runnable
        P4 - the progress type of the fourth runnable
        P5 - the progress type of the fifth runnable
        Parameters:
        runnableP1 - the first runnable to be resolved
        runnableP2 - the second runnable to be resolved
        runnableP3 - the third runnable to be resolved
        runnableP4 - the fourth runnable to be resolved
        runnableP5 - the fifth runnable to be resolved
        runnables - additional runnables to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2> Promise<MultipleResults2<V1,​V2>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredCallable<V1,​?> callableV1,
                                                                                                                                   DeferredCallable<V2,​?> callableV2)
        Description copied from interface: DeferredManager
        Submits 2 DeferredCallables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3> Promise<MultipleResults3<V1,​V2,​V3>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredCallable<V1,​?> callableV1,
                                                                                                                                                     DeferredCallable<V2,​?> callableV2,
                                                                                                                                                     DeferredCallable<V3,​?> callableV3)
        Description copied from interface: DeferredManager
        Submits 3 DeferredCallables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4> Promise<MultipleResults4<V1,​V2,​V3,​V4>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredCallable<V1,​?> callableV1,
                                                                                                                                                                       DeferredCallable<V2,​?> callableV2,
                                                                                                                                                                       DeferredCallable<V3,​?> callableV3,
                                                                                                                                                                       DeferredCallable<V4,​?> callableV4)
        Description copied from interface: DeferredManager
        Submits 4 DeferredCallables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResults5<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredCallable<V1,​?> callableV1,
                                                                                                                                                                                         DeferredCallable<V2,​?> callableV2,
                                                                                                                                                                                         DeferredCallable<V3,​?> callableV3,
                                                                                                                                                                                         DeferredCallable<V4,​?> callableV4,
                                                                                                                                                                                         DeferredCallable<V5,​?> callableV5)
        Description copied from interface: DeferredManager
        Submits 5 DeferredCallables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        V5 - the resolve type of the fifth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        callableV5 - the fifth callable to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResultsN<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredCallable<V1,​?> callableV1,
                                                                                                                                                                                         DeferredCallable<V2,​?> callableV2,
                                                                                                                                                                                         DeferredCallable<V3,​?> callableV3,
                                                                                                                                                                                         DeferredCallable<V4,​?> callableV4,
                                                                                                                                                                                         DeferredCallable<V5,​?> callableV5,
                                                                                                                                                                                         DeferredCallable<?,​?> callable6,
                                                                                                                                                                                         DeferredCallable<?,​?>... callables)
        Description copied from interface: DeferredManager
        Submits N DeferredCallables returns a combined Promise. The combined promise signals fail as soon as any of the callables rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first callable
        V2 - the resolve type of the second callable
        V3 - the resolve type of the third callable
        V4 - the resolve type of the fourth callable
        V5 - the resolve type of the fifth callable
        Parameters:
        callableV1 - the first callable to be resolved
        callableV2 - the second callable to be resolved
        callableV3 - the third callable to be resolved
        callableV4 - the fourth callable to be resolved
        callableV5 - the fifth callable to be resolved
        callables - additional callables to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4> Promise<MultipleResults4<V1,​V2,​V3,​V4>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredFutureTask<V1,​?> taskV1,
                                                                                                                                                                       DeferredFutureTask<V2,​?> taskV2,
                                                                                                                                                                       DeferredFutureTask<V3,​?> taskV3,
                                                                                                                                                                       DeferredFutureTask<V4,​?> taskV4)
        Description copied from interface: DeferredManager
        Submits 4 DeferredFutureTasks returns a combined Promise. The combined promise signals fail as soon as any of the tasks rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first task
        V2 - the resolve type of the second task
        V3 - the resolve type of the third task
        V4 - the resolve type of the fourth task
        Parameters:
        taskV1 - the first task to be resolved
        taskV2 - the second task to be resolved
        taskV3 - the third task to be resolved
        taskV4 - the fourth task to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResults5<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(DeferredFutureTask<V1,​?> taskV1,
                                                                                                                                                                                         DeferredFutureTask<V2,​?> taskV2,
                                                                                                                                                                                         DeferredFutureTask<V3,​?> taskV3,
                                                                                                                                                                                         DeferredFutureTask<V4,​?> taskV4,
                                                                                                                                                                                         DeferredFutureTask<V5,​?> taskV5)
        Description copied from interface: DeferredManager
        Submits 5 DeferredFutureTasks returns a combined Promise. The combined promise signals fail as soon as any of the tasks rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first task
        V2 - the resolve type of the second task
        V3 - the resolve type of the third task
        V4 - the resolve type of the fourth task
        V5 - the resolve type of the fifth task
        Parameters:
        taskV1 - the first task to be resolved
        taskV2 - the second task to be resolved
        taskV3 - the third task to be resolved
        taskV4 - the fourth task to be resolved
        taskV5 - the fifth task to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2> Promise<MultipleResults2<V1,​V2>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Future<V1> futureV1,
                                                                                                                                   java.util.concurrent.Future<V2> futureV2)
        Description copied from interface: DeferredManager
        Submits 2 Futures returns a combined Promise. The combined promise signals fail as soon as any of the futures rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first future
        V2 - the resolve type of the second future
        Parameters:
        futureV1 - the first future to be resolved
        futureV2 - the second future to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3> Promise<MultipleResults3<V1,​V2,​V3>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Future<V1> futureV1,
                                                                                                                                                     java.util.concurrent.Future<V2> futureV2,
                                                                                                                                                     java.util.concurrent.Future<V3> futureV3)
        Description copied from interface: DeferredManager
        Submits 3 Futures returns a combined Promise. The combined promise signals fail as soon as any of the futures rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first future
        V2 - the resolve type of the second future
        V3 - the resolve type of the third future
        Parameters:
        futureV1 - the first future to be resolved
        futureV2 - the second future to be resolved
        futureV3 - the third future to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4> Promise<MultipleResults4<V1,​V2,​V3,​V4>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Future<V1> futureV1,
                                                                                                                                                                       java.util.concurrent.Future<V2> futureV2,
                                                                                                                                                                       java.util.concurrent.Future<V3> futureV3,
                                                                                                                                                                       java.util.concurrent.Future<V4> futureV4)
        Description copied from interface: DeferredManager
        Submits 4 Futures returns a combined Promise. The combined promise signals fail as soon as any of the futures rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first future
        V2 - the resolve type of the second future
        V3 - the resolve type of the third future
        V4 - the resolve type of the fourth future
        Parameters:
        futureV1 - the first future to be resolved
        futureV2 - the second future to be resolved
        futureV3 - the third future to be resolved
        futureV4 - the fourth future to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResults5<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Future<V1> futureV1,
                                                                                                                                                                                         java.util.concurrent.Future<V2> futureV2,
                                                                                                                                                                                         java.util.concurrent.Future<V3> futureV3,
                                                                                                                                                                                         java.util.concurrent.Future<V4> futureV4,
                                                                                                                                                                                         java.util.concurrent.Future<V5> futureV5)
        Description copied from interface: DeferredManager
        Submits 5 Futures returns a combined Promise. The combined promise signals fail as soon as any of the futures rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first future
        V2 - the resolve type of the second future
        V3 - the resolve type of the third future
        V4 - the resolve type of the fourth future
        V5 - the resolve type of the fifth future
        Parameters:
        futureV1 - the first future to be resolved
        futureV2 - the second future to be resolved
        futureV3 - the third future to be resolved
        futureV4 - the fourth future to be resolved
        futureV5 - the fifth future to be resolved
        Returns:
        a combined Promise
      • when

        public <V1,​V2,​V3,​V4,​V5> Promise<MultipleResultsN<V1,​V2,​V3,​V4,​V5>,​OneReject<java.lang.Throwable>,​MasterProgress> when​(java.util.concurrent.Future<V1> futureV1,
                                                                                                                                                                                         java.util.concurrent.Future<V2> futureV2,
                                                                                                                                                                                         java.util.concurrent.Future<V3> futureV3,
                                                                                                                                                                                         java.util.concurrent.Future<V4> futureV4,
                                                                                                                                                                                         java.util.concurrent.Future<V5> futureV5,
                                                                                                                                                                                         java.util.concurrent.Future<?> future6,
                                                                                                                                                                                         java.util.concurrent.Future<?>... futures)
        Description copied from interface: DeferredManager
        Submits N Futures returns a combined Promise. The combined promise signals fail as soon as any of the futures rejects its value. The return type of the combined Promise contains all resolved values.
        Specified by:
        when in interface DeferredManager
        Type Parameters:
        V1 - the resolve type of the first future
        V2 - the resolve type of the second future
        V3 - the resolve type of the third future
        V4 - the resolve type of the fourth future
        V5 - the resolve type of the fifth future
        Parameters:
        futureV1 - the first future to be resolved
        futureV2 - the second future to be resolved
        futureV3 - the third future to be resolved
        futureV4 - the fourth future to be resolved
        futureV5 - the fifth future to be resolved
        futures - additional futures to be resolved
        Returns:
        a combined Promise
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(java.lang.Runnable runnableV1,
                                                                                                    java.lang.Runnable runnableV2,
                                                                                                    java.lang.Runnable... runnables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first runnable does so. Wraps each runnable with DeferredFutureTask.
        Specified by:
        race in interface DeferredManager
        Parameters:
        runnableV1 - a task to be executed. Must not be null
        runnableV2 - a task to be executed. Must not be null
        runnables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(java.util.concurrent.Callable<?> callableV1,
                                                                                                    java.util.concurrent.Callable<?> callableV2,
                                                                                                    java.util.concurrent.Callable<?>... callables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first callable does so. Wraps each callable with DeferredFutureTask.
        Specified by:
        race in interface DeferredManager
        Parameters:
        callableV1 - a task to be executed. Must not be null
        callableV2 - a task to be executed. Must not be null
        callables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(DeferredRunnable<?> runnableV1,
                                                                                                    DeferredRunnable<?> runnableV2,
                                                                                                    DeferredRunnable<?>... runnables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first runnable does so. Wraps each runnable with DeferredFutureTask.
        Specified by:
        race in interface DeferredManager
        Parameters:
        runnableV1 - a task to be executed. Must not be null
        runnableV2 - a task to be executed. Must not be null
        runnables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(DeferredCallable<?,​?> callableV1,
                                                                                                    DeferredCallable<?,​?> callableV2,
                                                                                                    DeferredCallable<?,​?>... callables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first callable does so. Wraps each callable with DeferredFutureTask.
        Specified by:
        race in interface DeferredManager
        Parameters:
        callableV1 - a task to be executed. Must not be null
        callableV2 - a task to be executed. Must not be null
        callables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(java.util.concurrent.Future<?> futureV1,
                                                                                                    java.util.concurrent.Future<?> futureV2,
                                                                                                    java.util.concurrent.Future<?>... futures)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first future does so. Wraps each future with DeferredFutureTask.
        Specified by:
        race in interface DeferredManager
        Parameters:
        futureV1 - a task to be executed. Must not be null
        futureV2 - a task to be executed. Must not be null
        futures - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(DeferredFutureTask<?,​?> taskV1,
                                                                                                    DeferredFutureTask<?,​?> taskV2,
                                                                                                    DeferredFutureTask<?,​?>... tasks)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first task does so.
        Specified by:
        race in interface DeferredManager
        Parameters:
        taskV1 - a task to be executed. Must not be null
        taskV2 - a task to be executed. Must not be null
        tasks - additional tasks to be executed. May be null
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • deferredCallableFor

        protected <D> DeferredCallable<D,​java.lang.Void> deferredCallableFor​(java.util.concurrent.Future<D> future)
      • settle

        public Promise<AllValues,​java.lang.Throwable,​MasterProgress> settle​(java.lang.Runnable runnableV1,
                                                                                        java.lang.Runnable runnableV2,
                                                                                        java.lang.Runnable... runnables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when each runnable does so. Wraps each runnable with DeferredFutureTask.
        Specified by:
        settle in interface DeferredManager
        Parameters:
        runnableV1 - a task to be executed. Must not be null
        runnableV2 - a task to be executed. Must not be null
        runnables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that collects resolve/reject values from all tasks.
      • settle

        public Promise<AllValues,​java.lang.Throwable,​MasterProgress> settle​(java.util.concurrent.Callable<?> callableV1,
                                                                                        java.util.concurrent.Callable<?> callableV2,
                                                                                        java.util.concurrent.Callable<?>... callables)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when each callable does so. Wraps each callable with DeferredFutureTask.
        Specified by:
        settle in interface DeferredManager
        Parameters:
        callableV1 - a task to be executed. Must not be null
        callableV2 - a task to be executed. Must not be null
        callables - additional tasks to be executed. May be null
        Returns:
        a composite Promise that collects resolve/reject values from all tasks.
      • settle

        public Promise<AllValues,​java.lang.Throwable,​MasterProgress> settle​(java.util.concurrent.Future<?> futureV1,
                                                                                        java.util.concurrent.Future<?> futureV2,
                                                                                        java.util.concurrent.Future<?>... futures)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when each future does so. Wraps each future with DeferredFutureTask.
        Specified by:
        settle in interface DeferredManager
        Parameters:
        futureV1 - a task to be executed. Must not be null
        futureV2 - a task to be executed. Must not be null
        futures - additional tasks to be executed. May be null
        Returns:
        a composite Promise that collects resolve/reject values from all tasks.
      • settle

        public Promise<AllValues,​java.lang.Throwable,​MasterProgress> settle​(Promise<?,​?,​?> promiseV1,
                                                                                        Promise<?,​?,​?> promiseV2,
                                                                                        Promise<?,​?,​?>... promises)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when each promise does so.
        Specified by:
        settle in interface DeferredManager
        Parameters:
        promiseV1 - a promise. Must not be null
        promiseV2 - a promise. Must not be null
        promises - additional promises. May be null
        Returns:
        a composite Promise that collects resolve/reject values from all promises.
      • assertNotEmpty

        @Deprecated
        protected void assertNotEmpty​(java.lang.Object[] objects)
        Deprecated.
      • assertNotNull

        protected void assertNotNull​(java.lang.Object object,
                                     java.lang.String name)
      • when

        public Promise<MultipleResults,​OneReject<?>,​MasterProgress> when​(java.lang.Iterable<?> iterable)
        Description copied from interface: DeferredManager
        Accept an iterable of a variety of different object types, and convert it into corresponding Promise. E.g., if an item is a Callable, it'll call DeferredManager.when(Callable) to convert that into a Promise.

        If the item is of an unknown type, it'll throw an IllegalArgumentException.

        Specified by:
        when in interface DeferredManager
        Parameters:
        iterable - the source of tasks. Must be non-null and not empty. Every item must be convertible to Promise
        Returns:
        a composite Promise that rejects as soon as the first of the submitted tasks is rejected or contains the resolution of all given tasks.
      • race

        public Promise<OneResult<?>,​OneReject<java.lang.Throwable>,​java.lang.Void> race​(java.lang.Iterable<?> iterable)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when the first task does so. If an item is a Callable, it'll call DeferredManager.when(Callable) to convert that into a Promise.

        If the item is of an unknown type, it'll throw an IllegalArgumentException. WARNING: does not accept items of type Promise.

        Specified by:
        race in interface DeferredManager
        Parameters:
        iterable - the source of tasks. Must be non-null and not empty. Every item must be convertible to Promise
        Returns:
        a composite Promise that resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
      • settle

        public Promise<AllValues,​java.lang.Throwable,​MasterProgress> settle​(java.lang.Iterable<?> iterable)
        Description copied from interface: DeferredManager
        Creates a Promise that signals done or reject when each task does so. If an item is a Callable, it'll call DeferredManager.when(Callable) to convert that into a Promise.

        If the item is of an unknown type, it'll throw an IllegalArgumentException.

        Specified by:
        settle in interface DeferredManager
        Parameters:
        iterable - the source of tasks. Must be non-null and not empty. Every item must be convertible to Promise
        Returns:
        a composite Promise that collects resolve/reject values from all promises.
      • resolve

        public <D,​F,​P> Promise<D,​F,​P> resolve​(D resolve)
        Description copied from interface: DeferredManager
        A convenience method create a Promise that immediately resolves to a value.
        Specified by:
        resolve in interface DeferredManager
        Parameters:
        resolve - value to resolve to
        Returns:
        a Promise that resolves to value
      • reject

        public <D,​F,​P> Promise<D,​F,​P> reject​(F reject)
        Description copied from interface: DeferredManager
        A convenience method to create a Promise that immediately fails with a reason.
        Specified by:
        reject in interface DeferredManager
        Parameters:
        reject - reason to reject
        Returns:
        a Promise that rejects with reason
      • canPromise

        protected boolean canPromise​(java.lang.Object o)
      • toPromise

        protected Promise<?,​?,​?> toPromise​(java.lang.Object o)
      • toDeferredFutureTask

        protected DeferredFutureTask<?,​?> toDeferredFutureTask​(java.lang.Object o)