Package org.web3j.utils
Class Async
- java.lang.Object
-
- org.web3j.utils.Async
-
public class Async extends java.lang.Object
Async task facilitation.
-
-
Constructor Summary
Constructors Constructor Description Async()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.ScheduledExecutorService
defaultExecutorService()
Provide a new ScheduledExecutorService instance.static <T> java.util.concurrent.CompletableFuture<T>
run(java.util.concurrent.Callable<T> callable)
-
-
-
Method Detail
-
run
public static <T> java.util.concurrent.CompletableFuture<T> run(java.util.concurrent.Callable<T> callable)
-
defaultExecutorService
public static java.util.concurrent.ScheduledExecutorService defaultExecutorService()
Provide a new ScheduledExecutorService instance.A shutdown hook is created to terminate the thread pool on application termination.
- Returns:
- new ScheduledExecutorService
-
-