public final class Futures extends Object
NotifyingFuture composition.| Modifier and Type | Method and Description |
|---|---|
static <T> NotifyingFuture<Void> |
andThen(NotifyingFuture<T> future,
Runnable after) |
static <T> NotifyingFuture<Void> |
andThen(NotifyingFuture<T> future,
Runnable after,
ExecutorService executorService)
Executes a task asynchronously after a future completion
|
static <T> NotifyingFuture<List<T>> |
combine(List<NotifyingFuture<T>> futures)
Returns a new
NotifyingFuture that will be completed when all of
the given futures completes. |
public static <T> NotifyingFuture<List<T>> combine(List<NotifyingFuture<T>> futures)
NotifyingFuture that will be completed when all of
the given futures completes.futures - List of NotifyingFuturespublic static <T> NotifyingFuture<Void> andThen(NotifyingFuture<T> future, Runnable after)
Futures#andThen(NotifyingFuture, Runnable, java.util.concurrent.ExecutorService)}public static <T> NotifyingFuture<Void> andThen(NotifyingFuture<T> future, Runnable after, ExecutorService executorService)
future - NotifyingFuture inputafter - Runnable to be executed after the input future completionexecutorService - The executor in order to run the taskCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.