Package com.yahoo.concurrent
Class CompletableFutures
java.lang.Object
com.yahoo.concurrent.CompletableFutures
Helper for
CompletableFuture / CompletionStage.- Author:
- bjorncs
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<List<T>>allOf(List<CompletableFuture<T>> futures) Similar toCompletableFuture.allOf(CompletableFuture[])but returns a list of the resultsstatic <T> CompletableFuture<T>firstOf(List<CompletableFuture<T>> futures) Returns a new completable future that is either - completed when any of the provided futures complete without exception - completed exceptionally once all provided futures complete exceptionally
-
Method Details
-
firstOf
Returns a new completable future that is either - completed when any of the provided futures complete without exception - completed exceptionally once all provided futures complete exceptionally -
allOf
Similar toCompletableFuture.allOf(CompletableFuture[])but returns a list of the results
-