public class CompositeFuture extends Future<CompositeFuture>
| Modifier and Type | Field and Description |
|---|---|
static TypeArg<CompositeFuture> |
__TYPE_ARG |
__typeArg_0| Constructor and Description |
|---|
CompositeFuture(CompositeFuture delegate) |
| Modifier and Type | Method and Description |
|---|---|
static <T1,T2> CompositeFuture |
all(Future<T1> f1,
Future<T2> f2)
Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.
|
static <T1,T2,T3> CompositeFuture |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Like
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures. |
static <T1,T2,T3,T4> |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Like
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures. |
static <T1,T2,T3,T4,T5> |
all(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Like
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures. |
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)
Like
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures. |
static CompositeFuture |
all(List<Future> futures)
Like
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures. |
static <T1,T2> CompositeFuture |
any(Future<T1> f1,
Future<T2> f2)
Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.
|
static <T1,T2,T3> CompositeFuture |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Like
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures. |
static <T1,T2,T3,T4> |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Like
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures. |
static <T1,T2,T3,T4,T5> |
any(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Like
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures. |
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)
Like
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures. |
static CompositeFuture |
any(List<Future> futures)
Like
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures. |
Throwable |
cause(int index)
Returns a cause of a wrapped future
|
void |
complete(CompositeFuture result)
Set the result.
|
Handler<AsyncResult<CompositeFuture>> |
completer() |
<U> Future<U> |
compose(java.util.function.Function<CompositeFuture,Future<U>> mapper)
Compose this future with a
mapper function. |
<U> Future<U> |
compose(Handler<CompositeFuture> handler,
Future<U> next)
Compose this future with a provided
next future. |
boolean |
failed(int index)
Returns true if a wrapped future is failed
|
CompositeFuture |
getDelegate() |
boolean |
isComplete(int index)
Returns true if a wrapped future is completed
|
static <T1,T2> CompositeFuture |
join(Future<T1> f1,
Future<T2> f2)
Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.
|
static <T1,T2,T3> CompositeFuture |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3)
Like
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures. |
static <T1,T2,T3,T4> |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4)
Like
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures. |
static <T1,T2,T3,T4,T5> |
join(Future<T1> f1,
Future<T2> f2,
Future<T3> f3,
Future<T4> f4,
Future<T5> f5)
Like
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures. |
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)
Like
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures. |
static CompositeFuture |
join(List<Future> futures)
Like
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures. |
<U> Future<U> |
map(java.util.function.Function<CompositeFuture,U> mapper)
Apply a
mapper function on this future. |
static CompositeFuture |
newInstance(CompositeFuture arg) |
CompositeFuture |
result()
The result of the operation.
|
<T> T |
resultAt(int index)
Returns the result of a wrapped future
|
rx.Single<CompositeFuture> |
rxSetHandler()
Set a handler for the result.
|
CompositeFuture |
setHandler(Handler<AsyncResult<CompositeFuture>> handler)
Set a handler for the result.
|
rx.Observable<CompositeFuture> |
setHandlerObservable()
Deprecated.
|
int |
size() |
boolean |
succeeded(int index)
Returns true if a wrapped future is succeeded
|
cause, complete, fail, fail, failed, failedFuture, failedFuture, future, isComplete, map, newInstance, newInstance, succeeded, succeededFuture, succeededFuturepublic static final TypeArg<CompositeFuture> __TYPE_ARG
public CompositeFuture(CompositeFuture delegate)
public CompositeFuture getDelegate()
getDelegate in class Future<CompositeFuture>public void complete(CompositeFuture result)
complete in class Future<CompositeFuture>result - the resultpublic CompositeFuture result()
result in class Future<CompositeFuture>public <U> Future<U> compose(Handler<CompositeFuture> handler, Future<U> next)
next future.
When this (the one on which compose is called) future succeeds, the handler will be called with
the completed value, this handler should complete the next future.
If the handler throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the next future and the handler
will not be called.
compose in class Future<CompositeFuture>handler - the handlernext - the next futurepublic <U> Future<U> compose(java.util.function.Function<CompositeFuture,Future<U>> mapper)
mapper function.
When this future (the one on which compose is called) succeeds, the mapper will be called with
the completed value and this mapper returns another future object. This returned future completion will complete
the future returned by this method call.
If the mapper throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the returned future and the mapper
will not be called.
compose in class Future<CompositeFuture>mapper - the mapper functionpublic <U> Future<U> map(java.util.function.Function<CompositeFuture,U> mapper)
mapper function on this future.
When this future succeeds, the mapper will be called with the completed value and this mapper
returns a value. This value will complete the future returned by this method call.
If the mapper throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the returned future and the mapper
will not be called.
map in class Future<CompositeFuture>mapper - the mapper functionpublic Handler<AsyncResult<CompositeFuture>> completer()
completer in class Future<CompositeFuture>public static <T1,T2> CompositeFuture all(Future<T1> f1, Future<T2> f2)
f1 or f2 fails.f1 - futuref2 - futurepublic static <T1,T2,T3> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3)
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures.f1 - f2 - f3 - public static <T1,T2,T3,T4> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures.f1 - f2 - f3 - f4 - public static <T1,T2,T3,T4,T5> CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures.f1 - f2 - f3 - f4 - f5 - public 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)
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures.f1 - f2 - f3 - f4 - f5 - f6 - public static CompositeFuture all(List<Future> futures)
all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures.When the list is empty, the returned future will be already completed.
futures - public static <T1,T2> CompositeFuture any(Future<T1> f1, Future<T2> f2)
f1 or f2 succeeds.f1 - futuref2 - futurepublic static <T1,T2,T3> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3)
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures.f1 - f2 - f3 - public static <T1,T2,T3,T4> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures.f1 - f2 - f3 - f4 - public static <T1,T2,T3,T4,T5> CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures.f1 - f2 - f3 - f4 - f5 - public 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)
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures.f1 - f2 - f3 - f4 - f5 - f6 - public static CompositeFuture any(List<Future> futures)
any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures.When the list is empty, the returned future will be already completed.
futures - public static <T1,T2> CompositeFuture join(Future<T1> f1, Future<T2> f2)
f1 or f2 fails.f1 - futuref2 - futurepublic static <T1,T2,T3> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3)
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 3 futures.f1 - f2 - f3 - public static <T1,T2,T3,T4> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 4 futures.f1 - f2 - f3 - f4 - public static <T1,T2,T3,T4,T5> CompositeFuture join(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 5 futures.f1 - f2 - f3 - f4 - f5 - public 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)
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with 6 futures.f1 - f2 - f3 - f4 - f5 - f6 - public static CompositeFuture join(List<Future> futures)
join(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>) but with a list of futures.When the list is empty, the returned future will be already completed.
futures - public CompositeFuture setHandler(Handler<AsyncResult<CompositeFuture>> handler)
FutureIf the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
setHandler in class Future<CompositeFuture>handler - the Handler that will be called with the result@Deprecated public rx.Observable<CompositeFuture> setHandlerObservable()
FutureIf the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
setHandlerObservable in class Future<CompositeFuture>public rx.Single<CompositeFuture> rxSetHandler()
FutureIf the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
rxSetHandler in class Future<CompositeFuture>public Throwable cause(int index)
index - the wrapped future indexpublic boolean succeeded(int index)
index - the wrapped future indexpublic boolean failed(int index)
index - the wrapped future indexpublic boolean isComplete(int index)
index - the wrapped future indexpublic <T> T resultAt(int index)
index - the wrapped future indexpublic int size()
public static CompositeFuture newInstance(CompositeFuture arg)
Copyright © 2017. All rights reserved.