public interface CompositeFuture extends Future<CompositeFuture>
futures
, it is useful when several futures
needs to be coordinated.
The handlers set for the coordinated futures are overridden by the handler of the composite future.Modifier and Type | Method and Description |
---|---|
static <T1,T2> CompositeFuture |
all(Future<T1> f1,
Future<T2> f2)
Deprecated.
instead use
Future.all(Future, Future) |
static <T1,T2,T3> CompositeFuture |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Deprecated.
instead use
Future.all(Future, Future, Future) |
static <T1,T2,T3,T4> |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Deprecated.
instead use
Future.all(Future, Future, Future, Future) |
static <T1,T2,T3,T4,T5> |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Deprecated.
|
static <T1,T2,T3,T4,T5,T6> |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5,
Future<T6> f6)
Deprecated.
|
static CompositeFuture |
all(List<Future> futures)
Deprecated.
instead use
Future.all(List) |
static <T1,T2> CompositeFuture |
any(Future<T1> f1,
Future<T2> f2)
Deprecated.
instead use
Future.any(Future, Future) |
static <T1,T2,T3> CompositeFuture |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Deprecated.
instead use
Future.any(Future, Future, Future) |
static <T1,T2,T3,T4> |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Deprecated.
instead use
Future.any(Future, Future, Future, Future) |
static <T1,T2,T3,T4,T5> |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Deprecated.
|
static <T1,T2,T3,T4,T5,T6> |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5,
Future<T6> f6)
Deprecated.
|
static CompositeFuture |
any(List<Future> futures)
Deprecated.
instead use
Future.any(List) |
Throwable |
cause(int index)
Returns a cause of a wrapped future
|
default List<Throwable> |
causes() |
boolean |
failed(int index)
Returns true if a wrapped future is failed
|
boolean |
isComplete(int index)
Returns true if a wrapped future is completed
|
static <T1,T2> CompositeFuture |
join(Future<T1> f1,
Future<T2> f2)
Deprecated.
instead use
Future.join(Future, Future) |
static <T1,T2,T3> CompositeFuture |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Deprecated.
instead use
Future.join(Future, Future, Future) |
static <T1,T2,T3,T4> |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Deprecated.
instead use
Future.join(Future, Future, Future, Future) |
static <T1,T2,T3,T4,T5> |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Deprecated.
|
static <T1,T2,T3,T4,T5,T6> |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5,
Future<T6> f6)
Deprecated.
|
static CompositeFuture |
join(List<Future> futures)
Deprecated.
instead use
Future.join(List) |
default <T> List<T> |
list() |
CompositeFuture |
onComplete(Handler<AsyncResult<CompositeFuture>> handler)
Add a handler to be notified of the result.
|
default CompositeFuture |
onFailure(Handler<Throwable> handler)
Add a handler to be notified of the failed result.
|
default CompositeFuture |
onSuccess(Handler<CompositeFuture> handler)
Add a handler to be notified of the succeeded result.
|
<T> T |
resultAt(int index)
Returns the result of a wrapped future
|
int |
size() |
boolean |
succeeded(int index)
Returns true if a wrapped future is succeeded
|
all, all, all, all, all, all, andThen, any, any, any, any, any, any, await, cause, compose, compose, eventually, eventually, expecting, failed, failedFuture, failedFuture, flatMap, fromCompletionStage, fromCompletionStage, future, isComplete, join, join, join, join, join, join, map, map, mapEmpty, onComplete, otherwise, otherwise, otherwiseEmpty, recover, result, succeeded, succeededFuture, succeededFuture, timeout, toCompletionStage, transform
@Deprecated static <T1,T2> CompositeFuture all(Future<T1> f1, Future<T2> f2)
Future.all(Future, Future)
f1
or f2
fails.f1
- futuref2
- future@Deprecated static <T1,T2,T3> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3)
Future.all(Future, Future, Future)
all(Future, Future)
but with 3 futures.@Deprecated static <T1,T2,T3,T4> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
Future.all(Future, Future, Future, Future)
all(Future, Future)
but with 4 futures.@Deprecated static <T1,T2,T3,T4,T5> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
Future.all(Future, Future, Future, Future, Future)
all(Future, Future)
but with 5 futures.@Deprecated static <T1,T2,T3,T4,T5,T6> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)
Future.all(Future, Future, Future, Future, Future, Future)
all(Future, Future)
but with 6 futures.@Deprecated static CompositeFuture all(List<Future> futures)
Future.all(List)
all(Future, Future)
but with a list of futures.When the list is empty, the returned future will be already completed.
@Deprecated static <T1,T2> CompositeFuture any(Future<T1> f1, Future<T2> f2)
Future.any(Future, Future)
f1
or f2
succeeds.f1
- futuref2
- future@Deprecated static <T1,T2,T3> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3)
Future.any(Future, Future, Future)
any(Future, Future)
but with 3 futures.@Deprecated static <T1,T2,T3,T4> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
Future.any(Future, Future, Future, Future)
any(Future, Future)
but with 4 futures.@Deprecated static <T1,T2,T3,T4,T5> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
Future.any(Future, Future, Future, Future, Future)
any(Future, Future)
but with 5 futures.@Deprecated static <T1,T2,T3,T4,T5,T6> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)
Future.any(Future, Future, Future, Future, Future, Future)
any(Future, Future)
but with 6 futures.@Deprecated static CompositeFuture any(List<Future> futures)
Future.any(List)
any(Future, Future)
but with a list of futures.When the list is empty, the returned future will be already completed.
@Deprecated static <T1,T2> CompositeFuture join(Future<T1> f1, Future<T2> f2)
Future.join(Future, Future)
f1
or f2
fails.f1
- futuref2
- future@Deprecated static <T1,T2,T3> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3)
Future.join(Future, Future, Future)
join(Future, Future)
but with 3 futures.@Deprecated static <T1,T2,T3,T4> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
Future.join(Future, Future, Future, Future)
join(Future, Future)
but with 4 futures.@Deprecated static <T1,T2,T3,T4,T5> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
Future.join(Future, Future, Future, Future, Future)
join(Future, Future)
but with 5 futures.@Deprecated static <T1,T2,T3,T4,T5,T6> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)
Future.join(Future, Future, Future, Future, Future, Future)
join(Future, Future)
but with 6 futures.@Deprecated static CompositeFuture join(List<Future> futures)
Future.join(List)
join(Future, Future)
but with a list of futures.When the list is empty, the returned future will be already completed.
CompositeFuture onComplete(Handler<AsyncResult<CompositeFuture>> handler)
Future
WARNING: this is a terminal operation.
If several handler
s are registered, there is no guarantee that they will be invoked in order of registration.
onComplete
in interface Future<CompositeFuture>
handler
- the handler that will be called with the resultdefault CompositeFuture onSuccess(Handler<CompositeFuture> handler)
Future
WARNING: this is a terminal operation.
If several handler
s are registered, there is no guarantee that they will be invoked in order of registration.
onSuccess
in interface Future<CompositeFuture>
handler
- the handler that will be called with the succeeded resultdefault CompositeFuture onFailure(Handler<Throwable> handler)
Future
WARNING: this is a terminal operation.
If several handler
s are registered, there is no guarantee that they will be invoked in order of registration.
onFailure
in interface Future<CompositeFuture>
handler
- the handler that will be called with the failed resultThrowable cause(int index)
index
- the wrapped future indexboolean succeeded(int index)
index
- the wrapped future indexboolean failed(int index)
index
- the wrapped future indexboolean isComplete(int index)
index
- the wrapped future index<T> T resultAt(int index)
index
- the wrapped future indexint size()
default <T> List<T> list()
Copyright © 2024 Eclipse. All rights reserved.