Class Futures
java.lang.Object
com.inductiveautomation.ignition.common.util.Futures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T> Return aCompletableFuturethat has been completed exceptionally using the providedThrowable.static <T> TgetSafe(CompletableFuture<T> cf) static <T> CompletableFuture<List<T>> sequence(CompletableFuture<T>[] futures) static <T> CompletableFuture<List<T>> sequence(List<CompletableFuture<T>> futures) static <T> CompletableFuture<List<T>> sequence(Stream<CompletableFuture<T>> stream) static <T, R, E extends Throwable>
Function<T, CompletableFuture<R>> wrap(FragileFunction<T, R, E> fragileFunction)
-
Constructor Details
-
Futures
public Futures()
-
-
Method Details
-
failedFuture
Return aCompletableFuturethat has been completed exceptionally using the providedThrowable.- Parameters:
ex- theThrowableto complete with.- Returns:
- a
CompletableFuturethat has been completed exceptionally using the providedThrowable.
-
sequence
-
sequence
-
sequence
-
getSafe
-
wrap
public static <T, R, E extends Throwable> Function<T, CompletableFuture<R>> wrap(FragileFunction<T, R, E> fragileFunction)
-