public class CompositeFutureImpl extends Object implements CompositeFuture, Handler<AsyncResult<CompositeFuture>>
| Modifier and Type | Method and Description |
|---|---|
static CompositeFuture |
all(Future<?>... results) |
static CompositeFuture |
any(Future<?>... results) |
Throwable |
cause()
A Throwable describing failure.
|
Throwable |
cause(int index)
Returns a cause of a wrapped future
|
void |
complete()
Set this instance as result.
|
void |
complete(CompositeFuture result)
Set the result.
|
Handler<AsyncResult<CompositeFuture>> |
completer() |
void |
fail(String failureMessage)
Try to set the failure.
|
void |
fail(Throwable cause)
Set the failure.
|
boolean |
failed()
Did it fail?
|
boolean |
failed(int index)
Returns true if a wrapped future is failed
|
void |
handle(AsyncResult<CompositeFuture> asyncResult)
Succeed or fail this future with the
AsyncResult event. |
boolean |
isComplete()
Has the future completed?
|
boolean |
isComplete(int index)
Returns true if a wrapped future is completed
|
static CompositeFuture |
join(Future<?>... results) |
CompositeFuture |
result()
The result of the operation.
|
<T> T |
resultAt(int index)
Returns the result of a wrapped future
|
CompositeFuture |
setHandler(Handler<AsyncResult<CompositeFuture>> handler)
|
int |
size() |
boolean |
succeeded()
Did it succeed?
|
boolean |
succeeded(int index)
Returns true if a wrapped future is succeeded
|
boolean |
tryComplete()
Try to set this instance as result.
|
boolean |
tryComplete(CompositeFuture result)
Set the failure.
|
boolean |
tryFail(String failureMessage)
Try to set the failure.
|
boolean |
tryFail(Throwable cause)
Try to set the failure.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitall, all, all, all, all, all, any, any, any, any, any, any, join, join, join, join, join, join, list, onComplete, onFailure, onSuccesscompose, compose, compose, failedFuture, failedFuture, flatMap, future, future, map, map, mapEmpty, otherwise, otherwise, otherwiseEmpty, recover, succeededFuture, succeededFuturepublic static CompositeFuture all(Future<?>... results)
public static CompositeFuture any(Future<?>... results)
public static CompositeFuture join(Future<?>... results)
public CompositeFuture setHandler(Handler<AsyncResult<CompositeFuture>> handler)
FuturesetHandler in interface CompositeFuturesetHandler in interface Future<CompositeFuture>public Throwable cause(int index)
CompositeFuturecause in interface CompositeFutureindex - the wrapped future indexpublic boolean succeeded(int index)
CompositeFuturesucceeded in interface CompositeFutureindex - the wrapped future indexpublic boolean failed(int index)
CompositeFuturefailed in interface CompositeFutureindex - the wrapped future indexpublic boolean isComplete(int index)
CompositeFutureisComplete in interface CompositeFutureindex - the wrapped future indexpublic <T> T resultAt(int index)
CompositeFutureresultAt in interface CompositeFutureindex - the wrapped future indexpublic int size()
size in interface CompositeFuturepublic boolean isComplete()
FutureIt's completed if it's either succeeded or failed.
isComplete in interface Future<CompositeFuture>public boolean succeeded()
Futuresucceeded in interface AsyncResult<CompositeFuture>succeeded in interface Future<CompositeFuture>public boolean failed()
Futurefailed in interface AsyncResult<CompositeFuture>failed in interface Future<CompositeFuture>public Throwable cause()
Futurecause in interface AsyncResult<CompositeFuture>cause in interface Future<CompositeFuture>public CompositeFuture result()
Futureresult in interface AsyncResult<CompositeFuture>result in interface Future<CompositeFuture>public void complete()
CompositeFuturecomplete in interface CompositeFuturecomplete in interface Future<CompositeFuture>public void complete(CompositeFuture result)
Futurecomplete in interface Future<CompositeFuture>result - the resultpublic void fail(Throwable cause)
Futurefail in interface Future<CompositeFuture>cause - the failure causepublic void fail(String failureMessage)
Futurefail in interface Future<CompositeFuture>failureMessage - the failure messagepublic boolean tryComplete(CompositeFuture result)
FuturetryComplete in interface Future<CompositeFuture>result - the resultpublic boolean tryComplete()
CompositeFuturetryComplete in interface CompositeFuturetryComplete in interface Future<CompositeFuture>public boolean tryFail(Throwable cause)
FuturetryFail in interface Future<CompositeFuture>cause - the failure causepublic boolean tryFail(String failureMessage)
FuturetryFail in interface Future<CompositeFuture>failureMessage - the failure messagepublic Handler<AsyncResult<CompositeFuture>> completer()
completer in interface Future<CompositeFuture>public void handle(AsyncResult<CompositeFuture> asyncResult)
FutureAsyncResult event.handle in interface Future<CompositeFuture>handle in interface Handler<AsyncResult<CompositeFuture>>asyncResult - the async result to handleCopyright © 2020. All rights reserved.