Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Async

        public Async()
    • 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