Class Futures
java.lang.Object
io.stargate.sgv2.api.common.futures.Futures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> CompletableFuture<T>static <T> TgetUninterruptibly(CompletionStage<T> stage) Gets a future without reacting to interruptions: if the current thread is interrupted, the operation continues until the future completes, and the thread will be re-interrupted upon completion.static <T> CompletionStage<List<T>>sequence(List<CompletionStage<T>> futures) Returns a future of all the results, or a failed future if any of the inputs fails.
-
Constructor Details
-
Futures
public Futures()
-
-
Method Details
-
getUninterruptibly
Gets a future without reacting to interruptions: if the current thread is interrupted, the operation continues until the future completes, and the thread will be re-interrupted upon completion.If the future fails with an unchecked exception, it will be rethrown as-is. If it fails with a checked exception, it will be wrapped in an
UncheckedExecutionException. -
failedFuture
-
sequence
Returns a future of all the results, or a failed future if any of the inputs fails.
-