Class AsyncHelper

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean

    
    public class AsyncHelper
     implements DisposableBean
                        
    Since:

    2024-05-13

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void destroy()
      static boolean isPrepared() whether this helper is prepared
      static Executor Async()
      static CompletableFuture<Void> Async(@NotNull() Runnable task) just like default @Async, but not AsyncUncaughtExceptionHandler
      static <T> CompletableFuture<T> Async(@NotNull() Supplier<T> supplier) just like default @Async, but not AsyncUncaughtExceptionHandler
      static AsyncTaskExecutor AppTask()
      static AsyncTaskExecutor Lite()
      static ThreadPoolTaskExecutorBuilder ExecutorBuilder() Get ThreadPoolTaskExecutorBuilder, IllegalStateException if nonull but null.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • isPrepared

         static boolean isPrepared()

        whether this helper is prepared

      • AppTask

        @NotNull() static AsyncTaskExecutor AppTask()
      • Lite

        @NotNull() static AsyncTaskExecutor Lite()
      • ExecutorBuilder

        @NotNull() static ThreadPoolTaskExecutorBuilder ExecutorBuilder()

        Get ThreadPoolTaskExecutorBuilder, IllegalStateException if nonull but null.