Class AbstractDeferredManager
java.lang.Object
org.jdeferred2.impl.AbstractDeferredManager
- All Implemented Interfaces:
DeferredManager
- Direct Known Subclasses:
DefaultDeferredManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface DeferredManager
DeferredManager.StartPolicy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final org.slf4j.Loggerprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertNotEmpty(Object[] objects) Deprecated.protected voidassertNotNull(Object object, String name) protected booleancanPromise(Object o) protected <D> DeferredCallable<D, Void> deferredCallableFor(Future<D> future) abstract booleanrace(DeferredCallable<?, ?> callableV1, DeferredCallable<?, ?> callableV2, DeferredCallable<?, ?>... callables) race(DeferredFutureTask<?, ?> taskV1, DeferredFutureTask<?, ?> taskV2, DeferredFutureTask<?, ?>... tasks) race(DeferredRunnable<?> runnableV1, DeferredRunnable<?> runnableV2, DeferredRunnable<?>... runnables) <D,F, P> Promise <D, F, P> reject(F reject) A convenience method to create aPromisethat immediately fails with a reason.<D,F, P> Promise <D, F, P> resolve(D resolve) A convenience method create aPromisethat immediately resolves to a value.settle(DeferredCallable<?, ?> callableV1, DeferredCallable<?, ?> callableV2, DeferredCallable<?, ?>... callables) settle(DeferredFutureTask<?, ?> taskV1, DeferredFutureTask<?, ?> taskV2, DeferredFutureTask<?, ?>... tasks) settle(DeferredRunnable<?> runnableV1, DeferredRunnable<?> runnableV2, DeferredRunnable<?>... runnables) protected abstract voidprotected abstract voidsubmitForSingle(DeferredFutureTask<?, ?>[] tasks) protected DeferredFutureTask<?, ?> protected Promise<?, ?, ?> Accept an iterable of a variety of different object types, and convert it into corresponding Promise.WrapsRunnablewithDeferredFutureTask.WrapsRunnablewithDeferredFutureTaskWrapsCallablewithDeferredFutureTask<V1,V2> Promise <MultipleResults2<V1, V2>, OneReject<Throwable>, MasterProgress> Submits 2Callables returns a combinedPromise.<V1,V2, V3> Promise <MultipleResults3<V1, V2, V3>, OneReject<Throwable>, MasterProgress> Submits 3Callables returns a combinedPromise.<V1,V2, V3, V4>
Promise<MultipleResults4<V1, V2, V3, V4>, OneReject<Throwable>, MasterProgress> when(Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4) Submits 4Callables returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResults5<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4, Callable<V5> callableV5) Submits 5Callables returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResultsN<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4, Callable<V5> callableV5, Callable<?> callable6, Callable<?>... callables) WrapsFutureand waits forFuture.get()to return a result in the background.<V1,V2> Promise <MultipleResults2<V1, V2>, OneReject<Throwable>, MasterProgress> Submits 2Futures returns a combinedPromise.<V1,V2, V3> Promise <MultipleResults3<V1, V2, V3>, OneReject<Throwable>, MasterProgress> Submits 3Futures returns a combinedPromise.<V1,V2, V3, V4>
Promise<MultipleResults4<V1, V2, V3, V4>, OneReject<Throwable>, MasterProgress> Submits 4Futures returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResults5<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3, Future<V4> futureV4, Future<V5> futureV5) Submits 5Futures returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResultsN<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3, Future<V4> futureV4, Future<V5> futureV5, Future<?> future6, Future<?>... futures) when(DeferredCallable<D, P> callable) WrapsDeferredCallablewithDeferredFutureTask<V1,V2> Promise <MultipleResults2<V1, V2>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2) Submits 2DeferredCallables returns a combinedPromise.<V1,V2, V3> Promise <MultipleResults3<V1, V2, V3>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3) Submits 3DeferredCallables returns a combinedPromise.<V1,V2, V3, V4>
Promise<MultipleResults4<V1, V2, V3, V4>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4) Submits 4DeferredCallables returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResults5<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4, DeferredCallable<V5, ?> callableV5) Submits 5DeferredCallables returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResultsN<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4, DeferredCallable<V5, ?> callableV5, DeferredCallable<?, ?> callable6, DeferredCallable<?, ?>... callables) when(DeferredFutureTask<D, P> task) May or may not submitDeferredFutureTaskfor execution.<V1,V2> Promise <MultipleResults2<V1, V2>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2) Submits 2DeferredFutureTasks returns a combinedPromise.<V1,V2, V3> Promise <MultipleResults3<V1, V2, V3>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3) Submits 3DeferredFutureTasks returns a combinedPromise.<V1,V2, V3, V4>
Promise<MultipleResults4<V1, V2, V3, V4>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4) Submits 4DeferredFutureTasks returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResults5<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4, DeferredFutureTask<V5, ?> taskV5) Submits 5DeferredFutureTasks returns a combinedPromise.<V1,V2, V3, V4, V5>
Promise<MultipleResultsN<V1, V2, V3, V4, V5>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4, DeferredFutureTask<V5, ?> taskV5, DeferredFutureTask<?, ?> task6, DeferredFutureTask<?, ?>... tasks) when(DeferredRunnable<P> runnable) WrapsDeferredRunnablewithDeferredFutureTask<P1,P2> Promise <MultipleResults2<Void, Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2) Submits 2DeferredRunnables returns a combinedPromise.<P1,P2, P3> Promise <MultipleResults3<Void, Void, Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3) Submits 3DeferredRunnables returns a combinedPromise.<P1,P2, P3, P4>
Promise<MultipleResults4<Void, Void, Void, Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4) Submits 4DeferredRunnables returns a combinedPromise.<P1,P2, P3, P4, P5>
Promise<MultipleResults5<Void, Void, Void, Void, Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4, DeferredRunnable<P5> runnableP5) Submits 5DeferredRunnables returns a combinedPromise.<P1,P2, P3, P4, P5>
Promise<MultipleResultsN<Void, Void, Void, Void, Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4, DeferredRunnable<P5> runnableP5, DeferredRunnable<?> runnable6, DeferredRunnable<?>... runnables) <D,F, P> Promise <D, F, P> Simply returns the promise.<F,V1, V2> Promise <MultipleResults2<V1, V2>, OneReject<F>, MasterProgress> Submits 2Promises returns a combinedPromise.<F,V1, V2, V3>
Promise<MultipleResults3<V1, V2, V3>, OneReject<F>, MasterProgress> Submits 3Promises returns a combinedPromise.<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) Submits 4Promises returns a combinedPromise.<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) Submits 5Promises returns a combinedPromise.<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)
-
Field Details
-
PROMISE_V1
- See Also:
-
PROMISE_V2
- See Also:
-
PROMISE_V3
- See Also:
-
PROMISE_V4
- See Also:
-
PROMISE_V5
- See Also:
-
CALLABLE_V1
- See Also:
-
CALLABLE_V2
- See Also:
-
CALLABLE_V3
- See Also:
-
CALLABLE_V4
- See Also:
-
CALLABLE_V5
- See Also:
-
RUNNABLE_V1
- See Also:
-
RUNNABLE_V2
- See Also:
-
RUNNABLE_V3
- See Also:
-
RUNNABLE_V4
- See Also:
-
RUNNABLE_V5
- See Also:
-
TASK_V1
- See Also:
-
TASK_V2
- See Also:
-
TASK_V3
- See Also:
-
TASK_V4
- See Also:
-
TASK_V5
- See Also:
-
FUTURE_V1
- See Also:
-
FUTURE_V2
- See Also:
-
FUTURE_V3
- See Also:
-
FUTURE_V4
- See Also:
-
FUTURE_V5
- See Also:
-
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
AbstractDeferredManager
public AbstractDeferredManager()
-
-
Method Details
-
submit
-
submit
-
isAutoSubmit
-
when
public <F,V1, Promise<MultipleResults2<V1,V2> V2>, OneReject<F>, MasterProgress> when(Promise<V1, ?, ?> promiseV1, Promise<V2, ?, ?> promiseV2) Description copied from interface:DeferredManagerSubmits 2Promises returns a combinedPromise. The combined promise signalsfailas soon as any of the promises rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
F- the common type the promises may rejectV1- the resolve type of the first promiseV2- the resolve type of the second promise- Parameters:
promiseV1- the first promise to be resolvedpromiseV2- the second promise to be resolved- Returns:
- a combined
Promise
-
when
public <F,V1, Promise<MultipleResults3<V1,V2, V3> V2, whenV3>, OneReject<F>, MasterProgress> (Promise<V1, ?, ?> promiseV1, Promise<V2, ?, ?> promiseV2, Promise<V3, ?, ?> promiseV3) Description copied from interface:DeferredManagerSubmits 3Promises returns a combinedPromise. The combined promise signalsfailas soon as any of the promises rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
F- the common type the promises may rejectV1- the resolve type of the first promiseV2- the resolve type of the second promiseV3- the resolve type of the third promise- Parameters:
promiseV1- the first promise to be resolvedpromiseV2- the second promise to be resolvedpromiseV3- the third promise to be resolved- Returns:
- a combined
Promise
-
when
public <F,V1, Promise<MultipleResults4<V1,V2, V3, V4> V2, whenV3, V4>, OneReject<F>, MasterProgress> (Promise<V1, ?, ?> promiseV1, Promise<V2, ?, ?> promiseV2, Promise<V3, ?, ?> promiseV3, Promise<V4, ?, ?> promiseV4) Description copied from interface:DeferredManagerSubmits 4Promises returns a combinedPromise. The combined promise signalsfailas soon as any of the promises rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
F- the common type the promises may rejectV1- the resolve type of the first promiseV2- the resolve type of the second promiseV3- the resolve type of the third promiseV4- the resolve type of the fourth promise- Parameters:
promiseV1- the first promise to be resolvedpromiseV2- the second promise to be resolvedpromiseV3- the third promise to be resolvedpromiseV4- the fourth promise to be resolved- Returns:
- a combined
Promise
-
when
public <F,V1, Promise<MultipleResults5<V1,V2, V3, V4, V5> V2, whenV3, V4, V5>, OneReject<F>, MasterProgress> (Promise<V1, ?, ?> promiseV1, Promise<V2, ?, ?> promiseV2, Promise<V3, ?, ?> promiseV3, Promise<V4, ?, ?> promiseV4, Promise<V5, ?, ?> promiseV5) Description copied from interface:DeferredManagerSubmits 5Promises returns a combinedPromise. The combined promise signalsfailas soon as any of the promises rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
F- the common type the promises may rejectV1- the resolve type of the first promiseV2- the resolve type of the second promiseV3- the resolve type of the third promiseV4- the resolve type of the fourth promiseV5- the resolve type of the fifth promise- Parameters:
promiseV1- the first promise to be resolvedpromiseV2- the second promise to be resolvedpromiseV3- the third promise to be resolvedpromiseV4- the fourth promise to be resolvedpromiseV5- the fifth promise to be resolved- Returns:
- a combined
Promise
-
when
public <F,V1, Promise<MultipleResultsN<V1,V2, V3, V4, V5> V2, whenV3, V4, V5>, OneReject<F>, MasterProgress> (Promise<V1, ?, ?> promiseV1, Promise<V2, ?, ?> promiseV2, Promise<V3, ?, ?> promiseV3, Promise<V4, ?, ?> promiseV4, Promise<V5, ?, ?> promiseV5, Promise<?, ?, ?> promise6, Promise<?, ?, ?>... promises) Description copied from interface:DeferredManagerSubmitsNPromises returns a combinedPromise. The combined promise signalsfailas soon as any of the promises rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
F- the common type the promises may rejectV1- the resolve type of the first promiseV2- the resolve type of the second promiseV3- the resolve type of the third promiseV4- the resolve type of the fourth promiseV5- the resolve type of the fifth promise- Parameters:
promiseV1- the first promise to be resolvedpromiseV2- the second promise to be resolvedpromiseV3- the third promise to be resolvedpromiseV4- the fourth promise to be resolvedpromiseV5- the fifth promise to be resolvedpromises- additional promises to be resolved- Returns:
- a combined
Promise
-
when
public Promise<MultipleResults, OneReject<Throwable>, MasterProgress> when(Runnable runnable1, Runnable runnable2, Runnable... runnables) Description copied from interface:DeferredManagerWrapsRunnablewithDeferredFutureTask- Specified by:
whenin interfaceDeferredManager- Parameters:
runnable1- the first runnablerunnable2- the second runnablerunnables- additional runnables- See Also:
-
when
public <V1,V2> Promise<MultipleResults2<V1,V2>, OneReject<Throwable>, MasterProgress> when(Callable<V1> callableV1, Callable<V2> callableV2) Description copied from interface:DeferredManagerSubmits 2Callables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults3<V1,V3> V2, whenV3>, OneReject<Throwable>, MasterProgress> (Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3) Description copied from interface:DeferredManagerSubmits 3Callables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults4<V1,V3, V4> V2, whenV3, V4>, OneReject<Throwable>, MasterProgress> (Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4) Description copied from interface:DeferredManagerSubmits 4Callables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults5<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4, Callable<V5> callableV5) Description copied from interface:DeferredManagerSubmits 5Callables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callableV5- the resolve type of the fifth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolvedcallableV5- the fifth callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResultsN<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (Callable<V1> callableV1, Callable<V2> callableV2, Callable<V3> callableV3, Callable<V4> callableV4, Callable<V5> callableV5, Callable<?> callable6, Callable<?>... callables) Description copied from interface:DeferredManagerSubmitsNCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callableV5- the resolve type of the fifth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolvedcallableV5- the fifth callable to be resolvedcallables- additional callables to be resolved- Returns:
- a combined
Promise
-
when
public <P1,P2> Promise<MultipleResults2<Void,Void>, OneReject<Throwable>, MasterProgress> when(DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2) Description copied from interface:DeferredManagerSubmits 2DeferredRunnables returns a combinedPromise. The combined promise signalsfailas soon as any of the runnables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
P1- the progress type of the first runnableP2- the progress type of the second runnable- Parameters:
runnableP1- the first runnable to be resolvedrunnableP2- the second runnable to be resolved- Returns:
- a combined
Promise
-
when
public <P1,P2, Promise<MultipleResults3<Void,P3> Void, whenVoid>, OneReject<Throwable>, MasterProgress> (DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3) Description copied from interface:DeferredManagerSubmits 3DeferredRunnables returns a combinedPromise. The combined promise signalsfailas soon as any of the runnables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
P1- the progress type of the first runnableP2- the progress type of the second runnableP3- the progress type of the third runnable- Parameters:
runnableP1- the first runnable to be resolvedrunnableP2- the second runnable to be resolvedrunnableP3- the third runnable to be resolved- Returns:
- a combined
Promise
-
when
public <P1,P2, Promise<MultipleResults4<Void,P3, P4> Void, whenVoid, Void>, OneReject<Throwable>, MasterProgress> (DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4) Description copied from interface:DeferredManagerSubmits 4DeferredRunnables returns a combinedPromise. The combined promise signalsfailas soon as any of the runnables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
P1- the progress type of the first runnableP2- the progress type of the second runnableP3- the progress type of the third runnableP4- the progress type of the fourth runnable- Parameters:
runnableP1- the first runnable to be resolvedrunnableP2- the second runnable to be resolvedrunnableP3- the third runnable to be resolvedrunnableP4- the fourth runnable to be resolved- Returns:
- a combined
Promise
-
when
public <P1,P2, Promise<MultipleResults5<Void,P3, P4, P5> Void, whenVoid, Void, Void>, OneReject<Throwable>, MasterProgress> (DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4, DeferredRunnable<P5> runnableP5) Description copied from interface:DeferredManagerSubmits 5DeferredRunnables returns a combinedPromise. The combined promise signalsfailas soon as any of the runnables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
P1- the progress type of the first runnableP2- the progress type of the second runnableP3- the progress type of the third runnableP4- the progress type of the fourth runnableP5- the progress type of the fifth runnable- Parameters:
runnableP1- the first runnable to be resolvedrunnableP2- the second runnable to be resolvedrunnableP3- the third runnable to be resolvedrunnableP4- the fourth runnable to be resolvedrunnableP5- the fifth runnable to be resolved- Returns:
- a combined
Promise
-
when
public <P1,P2, Promise<MultipleResultsN<Void,P3, P4, P5> Void, whenVoid, Void, Void>, OneReject<Throwable>, MasterProgress> (DeferredRunnable<P1> runnableP1, DeferredRunnable<P2> runnableP2, DeferredRunnable<P3> runnableP3, DeferredRunnable<P4> runnableP4, DeferredRunnable<P5> runnableP5, DeferredRunnable<?> runnable6, DeferredRunnable<?>... runnables) Description copied from interface:DeferredManagerSubmitsNDeferredRunnables returns a combinedPromise. The combined promise signalsfailas soon as any of the runnables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
P1- the progress type of the first runnableP2- the progress type of the second runnableP3- the progress type of the third runnableP4- the progress type of the fourth runnableP5- the progress type of the fifth runnable- Parameters:
runnableP1- the first runnable to be resolvedrunnableP2- the second runnable to be resolvedrunnableP3- the third runnable to be resolvedrunnableP4- the fourth runnable to be resolvedrunnableP5- the fifth runnable to be resolvedrunnables- additional runnables to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2> Promise<MultipleResults2<V1,V2>, OneReject<Throwable>, MasterProgress> when(DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2) Description copied from interface:DeferredManagerSubmits 2DeferredCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults3<V1,V3> V2, whenV3>, OneReject<Throwable>, MasterProgress> (DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3) Description copied from interface:DeferredManagerSubmits 3DeferredCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults4<V1,V3, V4> V2, whenV3, V4>, OneReject<Throwable>, MasterProgress> (DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4) Description copied from interface:DeferredManagerSubmits 4DeferredCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults5<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4, DeferredCallable<V5, ?> callableV5) Description copied from interface:DeferredManagerSubmits 5DeferredCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callableV5- the resolve type of the fifth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolvedcallableV5- the fifth callable to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResultsN<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (DeferredCallable<V1, ?> callableV1, DeferredCallable<V2, ?> callableV2, DeferredCallable<V3, ?> callableV3, DeferredCallable<V4, ?> callableV4, DeferredCallable<V5, ?> callableV5, DeferredCallable<?, ?> callable6, DeferredCallable<?, ?>... callables) Description copied from interface:DeferredManagerSubmitsNDeferredCallables returns a combinedPromise. The combined promise signalsfailas soon as any of the callables rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first callableV2- the resolve type of the second callableV3- the resolve type of the third callableV4- the resolve type of the fourth callableV5- the resolve type of the fifth callable- Parameters:
callableV1- the first callable to be resolvedcallableV2- the second callable to be resolvedcallableV3- the third callable to be resolvedcallableV4- the fourth callable to be resolvedcallableV5- the fifth callable to be resolvedcallables- additional callables to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2> Promise<MultipleResults2<V1,V2>, OneReject<Throwable>, MasterProgress> when(DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2) Description copied from interface:DeferredManagerSubmits 2DeferredFutureTasks returns a combinedPromise. The combined promise signalsfailas soon as any of the tasks rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first taskV2- the resolve type of the second task- Parameters:
taskV1- the first task to be resolvedtaskV2- the second task to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults3<V1,V3> V2, whenV3>, OneReject<Throwable>, MasterProgress> (DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3) Description copied from interface:DeferredManagerSubmits 3DeferredFutureTasks returns a combinedPromise. The combined promise signalsfailas soon as any of the tasks rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first taskV2- the resolve type of the second taskV3- the resolve type of the third task- Parameters:
taskV1- the first task to be resolvedtaskV2- the second task to be resolvedtaskV3- the third task to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults4<V1,V3, V4> V2, whenV3, V4>, OneReject<Throwable>, MasterProgress> (DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4) Description copied from interface:DeferredManagerSubmits 4DeferredFutureTasks returns a combinedPromise. The combined promise signalsfailas soon as any of the tasks rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first taskV2- the resolve type of the second taskV3- the resolve type of the third taskV4- the resolve type of the fourth task- Parameters:
taskV1- the first task to be resolvedtaskV2- the second task to be resolvedtaskV3- the third task to be resolvedtaskV4- the fourth task to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults5<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4, DeferredFutureTask<V5, ?> taskV5) Description copied from interface:DeferredManagerSubmits 5DeferredFutureTasks returns a combinedPromise. The combined promise signalsfailas soon as any of the tasks rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first taskV2- the resolve type of the second taskV3- the resolve type of the third taskV4- the resolve type of the fourth taskV5- the resolve type of the fifth task- Parameters:
taskV1- the first task to be resolvedtaskV2- the second task to be resolvedtaskV3- the third task to be resolvedtaskV4- the fourth task to be resolvedtaskV5- the fifth task to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResultsN<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (DeferredFutureTask<V1, ?> taskV1, DeferredFutureTask<V2, ?> taskV2, DeferredFutureTask<V3, ?> taskV3, DeferredFutureTask<V4, ?> taskV4, DeferredFutureTask<V5, ?> taskV5, DeferredFutureTask<?, ?> task6, DeferredFutureTask<?, ?>... tasks) Description copied from interface:DeferredManagerSubmitsNDeferredFutureTasks returns a combinedPromise. The combined promise signalsfailas soon as any of the tasks rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first taskV2- the resolve type of the second taskV3- the resolve type of the third taskV4- the resolve type of the fourth taskV5- the resolve type of the fifth task- Parameters:
taskV1- the first task to be resolvedtaskV2- the second task to be resolvedtaskV3- the third task to be resolvedtaskV4- the fourth task to be resolvedtaskV5- the fifth task to be resolvedtasks- additional tasks to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2> Promise<MultipleResults2<V1,V2>, OneReject<Throwable>, MasterProgress> when(Future<V1> futureV1, Future<V2> futureV2) Description copied from interface:DeferredManagerSubmits 2Futures returns a combinedPromise. The combined promise signalsfailas soon as any of the futures rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first futureV2- the resolve type of the second future- Parameters:
futureV1- the first future to be resolvedfutureV2- the second future to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults3<V1,V3> V2, whenV3>, OneReject<Throwable>, MasterProgress> (Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3) Description copied from interface:DeferredManagerSubmits 3Futures returns a combinedPromise. The combined promise signalsfailas soon as any of the futures rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first futureV2- the resolve type of the second futureV3- the resolve type of the third future- Parameters:
futureV1- the first future to be resolvedfutureV2- the second future to be resolvedfutureV3- the third future to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults4<V1,V3, V4> V2, whenV3, V4>, OneReject<Throwable>, MasterProgress> (Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3, Future<V4> futureV4) Description copied from interface:DeferredManagerSubmits 4Futures returns a combinedPromise. The combined promise signalsfailas soon as any of the futures rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first futureV2- the resolve type of the second futureV3- the resolve type of the third futureV4- the resolve type of the fourth future- Parameters:
futureV1- the first future to be resolvedfutureV2- the second future to be resolvedfutureV3- the third future to be resolvedfutureV4- the fourth future to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResults5<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3, Future<V4> futureV4, Future<V5> futureV5) Description copied from interface:DeferredManagerSubmits 5Futures returns a combinedPromise. The combined promise signalsfailas soon as any of the futures rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first futureV2- the resolve type of the second futureV3- the resolve type of the third futureV4- the resolve type of the fourth futureV5- the resolve type of the fifth future- Parameters:
futureV1- the first future to be resolvedfutureV2- the second future to be resolvedfutureV3- the third future to be resolvedfutureV4- the fourth future to be resolvedfutureV5- the fifth future to be resolved- Returns:
- a combined
Promise
-
when
public <V1,V2, Promise<MultipleResultsN<V1,V3, V4, V5> V2, whenV3, V4, V5>, OneReject<Throwable>, MasterProgress> (Future<V1> futureV1, Future<V2> futureV2, Future<V3> futureV3, Future<V4> futureV4, Future<V5> futureV5, Future<?> future6, Future<?>... futures) Description copied from interface:DeferredManagerSubmitsNFutures returns a combinedPromise. The combined promise signalsfailas soon as any of the futures rejects its value. The return type of the combinedPromisecontains all resolved values.- Specified by:
whenin interfaceDeferredManager- Type Parameters:
V1- the resolve type of the first futureV2- the resolve type of the second futureV3- the resolve type of the third futureV4- the resolve type of the fourth futureV5- the resolve type of the fifth future- Parameters:
futureV1- the first future to be resolvedfutureV2- the second future to be resolvedfutureV3- the third future to be resolvedfutureV4- the fourth future to be resolvedfutureV5- the fifth future to be resolvedfutures- additional futures to be resolved- Returns:
- a combined
Promise
-
when
Description copied from interface:DeferredManagerSimply returns the promise.- Specified by:
whenin interfaceDeferredManager- Parameters:
promise-- Returns:
- promise
-
when
Description copied from interface:DeferredManagerWrapsDeferredRunnablewithDeferredFutureTask- Specified by:
whenin interfaceDeferredManager- Parameters:
runnable-- Returns:
DeferredManager.when(DeferredFutureTask)- See Also:
-
when
Description copied from interface:DeferredManagerWrapsDeferredCallablewithDeferredFutureTask- Specified by:
whenin interfaceDeferredManager- Parameters:
callable-- Returns:
DeferredManager.when(DeferredFutureTask)- See Also:
-
when
Description copied from interface:DeferredManagerWrapsRunnablewithDeferredFutureTask.- Specified by:
whenin interfaceDeferredManager- Parameters:
runnable-- Returns:
DeferredManager.when(DeferredFutureTask)- See Also:
-
when
Description copied from interface:DeferredManagerWrapsCallablewithDeferredFutureTask- Specified by:
whenin interfaceDeferredManager- Parameters:
callable-- Returns:
DeferredManager.when(DeferredFutureTask)- See Also:
-
when
Description copied from interface:DeferredManagerMay or may not submitDeferredFutureTaskfor execution. See implementation documentation.- Specified by:
whenin interfaceDeferredManager- Parameters:
task-- Returns:
DeferredFutureTask.promise()
-
when
Description copied from interface:DeferredManagerWrapsFutureand waits forFuture.get()to return a result in the background.- Specified by:
whenin interfaceDeferredManager- Parameters:
future-- Returns:
DeferredManager.when(Callable)
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(Runnable runnableV1, Runnable runnableV2, Runnable... runnables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first runnable does so. Wraps eachrunnablewithDeferredFutureTask.- Specified by:
racein interfaceDeferredManager- Parameters:
runnableV1- a task to be executed. Must not be nullrunnableV2- a task to be executed. Must not be nullrunnables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(Callable<?> callableV1, Callable<?> callableV2, Callable<?>... callables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first callable does so. Wraps eachcallablewithDeferredFutureTask.- Specified by:
racein interfaceDeferredManager- Parameters:
callableV1- a task to be executed. Must not be nullcallableV2- a task to be executed. Must not be nullcallables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(DeferredRunnable<?> runnableV1, DeferredRunnable<?> runnableV2, DeferredRunnable<?>... runnables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first runnable does so. Wraps eachrunnablewithDeferredFutureTask.- Specified by:
racein interfaceDeferredManager- Parameters:
runnableV1- a task to be executed. Must not be nullrunnableV2- a task to be executed. Must not be nullrunnables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(DeferredCallable<?, ?> callableV1, DeferredCallable<?, ?> callableV2, DeferredCallable<?, ?>... callables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first callable does so. Wraps eachcallablewithDeferredFutureTask.- Specified by:
racein interfaceDeferredManager- Parameters:
callableV1- a task to be executed. Must not be nullcallableV2- a task to be executed. Must not be nullcallables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(Future<?> futureV1, Future<?> futureV2, Future<?>... futures) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first future does so. Wraps eachfuturewithDeferredFutureTask.- Specified by:
racein interfaceDeferredManager- Parameters:
futureV1- a task to be executed. Must not be nullfutureV2- a task to be executed. Must not be nullfutures- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
race
public Promise<OneResult<?>, OneReject<Throwable>, Void> race(DeferredFutureTask<?, ?> taskV1, DeferredFutureTask<?, ?> taskV2, DeferredFutureTask<?, ?>... tasks) Description copied from interface:DeferredManager- Specified by:
racein interfaceDeferredManager- Parameters:
taskV1- a task to be executed. Must not be nulltaskV2- a task to be executed. Must not be nulltasks- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
submitForSingle
-
deferredCallableFor
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(Runnable runnableV1, Runnable runnableV2, Runnable... runnables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each runnable does so. Wraps eachrunnablewithDeferredFutureTask.- Specified by:
settlein interfaceDeferredManager- Parameters:
runnableV1- a task to be executed. Must not be nullrunnableV2- a task to be executed. Must not be nullrunnables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(Callable<?> callableV1, Callable<?> callableV2, Callable<?>... callables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each callable does so. Wraps eachcallablewithDeferredFutureTask.- Specified by:
settlein interfaceDeferredManager- Parameters:
callableV1- a task to be executed. Must not be nullcallableV2- a task to be executed. Must not be nullcallables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(DeferredRunnable<?> runnableV1, DeferredRunnable<?> runnableV2, DeferredRunnable<?>... runnables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each runnable does so. Wraps eachrunnablewithDeferredFutureTask.- Specified by:
settlein interfaceDeferredManager- Parameters:
runnableV1- a task to be executed. Must not be nullrunnableV2- a task to be executed. Must not be nullrunnables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(DeferredCallable<?, ?> callableV1, DeferredCallable<?, ?> callableV2, DeferredCallable<?, ?>... callables) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each callable does so. Wraps eachcallablewithDeferredFutureTask.- Specified by:
settlein interfaceDeferredManager- Parameters:
callableV1- a task to be executed. Must not be nullcallableV2- a task to be executed. Must not be nullcallables- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(Future<?> futureV1, Future<?> futureV2, Future<?>... futures) Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each future does so. Wraps eachfuturewithDeferredFutureTask.- Specified by:
settlein interfaceDeferredManager- Parameters:
futureV1- a task to be executed. Must not be nullfutureV2- a task to be executed. Must not be nullfutures- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(DeferredFutureTask<?, ?> taskV1, DeferredFutureTask<?, ?> taskV2, DeferredFutureTask<?, ?>... tasks) Description copied from interface:DeferredManager- Specified by:
settlein interfaceDeferredManager- Parameters:
taskV1- a task to be executed. Must not be nulltaskV2- a task to be executed. Must not be nulltasks- additional tasks to be executed. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all tasks.
-
settle
public Promise<AllValues, Throwable, MasterProgress> settle(Promise<?, ?, ?> promiseV1, Promise<?, ?, ?> promiseV2, Promise<?, ?, ?>... promises) Description copied from interface:DeferredManager- Specified by:
settlein interfaceDeferredManager- Parameters:
promiseV1- a promise. Must not be nullpromiseV2- a promise. Must not be nullpromises- additional promises. May be null- Returns:
- a composite
Promisethat collects resolve/reject values from all promises.
-
assertNotEmpty
Deprecated. -
assertNotNull
-
when
Description copied from interface:DeferredManagerAccept an iterable of a variety of different object types, and convert it into corresponding Promise. E.g., if an item is aCallable, it'll callDeferredManager.when(Callable)to convert that into a Promise.If the item is of an unknown type, it'll throw an
IllegalArgumentException.- Specified by:
whenin interfaceDeferredManager- Parameters:
iterable- the source of tasks. Must be non-null and not empty. Every item must be convertible toPromise- Returns:
- a composite
Promisethat rejects as soon as the first of the submitted tasks is rejected or contains the resolution of all given tasks.
-
race
Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen the first task does so. If an item is aCallable, it'll callDeferredManager.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 typePromise.- Specified by:
racein interfaceDeferredManager- Parameters:
iterable- the source of tasks. Must be non-null and not empty. Every item must be convertible toPromise- Returns:
- a composite
Promisethat resolves/rejects as soon as the first of the submitted tasks is resolved/rejected.
-
settle
Description copied from interface:DeferredManagerCreates aPromisethat signalsdoneorrejectwhen each task does so. If an item is aCallable, it'll callDeferredManager.when(Callable)to convert that into a Promise.If the item is of an unknown type, it'll throw an
IllegalArgumentException.- Specified by:
settlein interfaceDeferredManager- Parameters:
iterable- the source of tasks. Must be non-null and not empty. Every item must be convertible toPromise- Returns:
- a composite
Promisethat collects resolve/reject values from all promises.
-
resolve
Description copied from interface:DeferredManagerA convenience method create aPromisethat immediately resolves to a value.- Specified by:
resolvein interfaceDeferredManager- Parameters:
resolve- value to resolve to- Returns:
- a Promise that resolves to value
-
reject
Description copied from interface:DeferredManagerA convenience method to create aPromisethat immediately fails with a reason.- Specified by:
rejectin interfaceDeferredManager- Parameters:
reject- reason to reject- Returns:
- a
Promisethat rejects with reason
-
canPromise
-
toPromise
-
toDeferredFutureTask
-