public class AsyncUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AsyncUtil.ThrowingFunction<T,R> |
| Modifier and Type | Method and Description |
|---|---|
static <T> CompletableFuture<T> |
async(AsyncUtil.ThrowingFunction<CompletableFuture<T>,T> function) |
static <T> CompletableFuture<T> |
async(Callable<T> callable) |
static <T> Function<Predicate<T>,CompletableFuture<T>> |
await(Supplier<T> supplier) |
static <T> T |
get(CompletableFuture<T> completableFuture) |
static <T> T |
get(CompletableFuture<T> completableFuture,
Duration duration) |
public static <T> CompletableFuture<T> async(AsyncUtil.ThrowingFunction<CompletableFuture<T>,T> function)
public static <T> CompletableFuture<T> async(Callable<T> callable)
public static <T> Function<Predicate<T>,CompletableFuture<T>> await(Supplier<T> supplier)
public static <T> T get(CompletableFuture<T> completableFuture, Duration duration)
public static <T> T get(CompletableFuture<T> completableFuture)
Copyright © 2024. All rights reserved.