public class Async extends Object
| Constructor and Description |
|---|
Async() |
| Modifier and Type | Method and Description |
|---|---|
static ExecutorService |
getExecutor()
Returns executor for completable futures to create with
|
static CompletableFuture<Void> |
run(Runnable runnable)
Runs asynchronous task with own executor
|
static void |
shutdownExecutor()
Shutdown used executor service
|
static <U> CompletableFuture<U> |
supply(java.util.function.Supplier<U> supplier)
Runs asynchonous supplier with own executor
|
public static ExecutorService getExecutor()
public static void shutdownExecutor()
public static CompletableFuture<Void> run(Runnable runnable)
runnable - asynchronous taskpublic static <U> CompletableFuture<U> supply(java.util.function.Supplier<U> supplier)
U - supplier return typesupplier - asynchronous supplierCopyright © 2023. All rights reserved.