Class Futures
java.lang.Object
com.inductiveautomation.ignition.common.util.Futures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T>
Return aCompletableFuture
that has been completed exceptionally using the providedThrowable
.static <T> T
getSafe
(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 aCompletableFuture
that has been completed exceptionally using the providedThrowable
.- Parameters:
ex
- theThrowable
to complete with.- Returns:
- a
CompletableFuture
that has been completed exceptionally using the providedThrowable
.
-
sequence
-
sequence
-
sequence
-
getSafe
-
wrap
public static <T,R, Function<T,E extends Throwable> CompletableFuture<R>> wrap(FragileFunction<T, R, E> fragileFunction)
-