Package org.hawaiiframework.async
Class HawaiiAsyncUtil
- java.lang.Object
-
- org.hawaiiframework.async.HawaiiAsyncUtil
-
public final class HawaiiAsyncUtil extends Object
Utility to retrieve the value from aCompletableFuture.All exceptions are wrapped in a
HawaiiTaskExecutionException.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tget(@NotNull CompletableFuture<T> future)Delegates toCompletableFuture.get().static <T> Tget(@NotNull CompletableFuture<T> future, @NotNull Long timeout, @NotNull TimeUnit unit)Delegates toCompletableFuture.get(long, TimeUnit)}.static <T> TgetNow(@NotNull CompletableFuture<T> future, T valueIfAbsent)Delegates toCompletableFuture.getNow(Object).
-
-
-
Method Detail
-
get
public static <T> T get(@NotNull @NotNull CompletableFuture<T> future)Delegates toCompletableFuture.get().
-
get
public static <T> T get(@NotNull @NotNull CompletableFuture<T> future, @NotNull @NotNull Long timeout, @NotNull @NotNull TimeUnit unit)Delegates toCompletableFuture.get(long, TimeUnit)}.
-
getNow
public static <T> T getNow(@NotNull @NotNull CompletableFuture<T> future, T valueIfAbsent)Delegates toCompletableFuture.getNow(Object).
-
-