public class FutureUtils extends Object
| Constructor and Description |
|---|
FutureUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> CompletableFuture<List<T>> |
allOf(List<CompletableFuture<T>> futures)
Similar to
CompletableFuture.allOf(CompletableFuture[]) with a few important
differences:
Completes successfully as soon as *all* of the futures complete successfully
Completes exceptionally as soon as *any* of the futures complete exceptionally
In case it's completed exceptionally all the other futures not completed yet, will be
cancelled
|
public static <T> CompletableFuture<List<T>> allOf(List<CompletableFuture<T>> futures)
CompletableFuture.allOf(CompletableFuture[]) with a few important
differences:
futures - list of CompletableFuturesCopyright © 2024 The Apache Software Foundation. All rights reserved.