Class CompletableFutures


  • public class CompletableFutures
    extends java.lang.Object
    Helper for CompletableFuture / CompletionStage.
    Author:
    bjorncs
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.concurrent.CompletableFuture<T> firstOf​(java.util.List<java.util.concurrent.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • firstOf

        public static <T> java.util.concurrent.CompletableFuture<T> firstOf​(java.util.List<java.util.concurrent.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