Class AsyncHelper
-
- All Implemented Interfaces:
-
org.springframework.beans.factory.DisposableBean
public class AsyncHelper implements DisposableBean- Since:
2024-05-13
trydofor
-
-
Method Summary
Modifier and Type Method Description voiddestroy()static booleanisPrepared()whether this helper is prepared static ExecutorAsync()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 AsyncTaskExecutorAppTask()static AsyncTaskExecutorLite()static ThreadPoolTaskExecutorBuilderExecutorBuilder()Get ThreadPoolTaskExecutorBuilder, IllegalStateException if nonull but null. -
-
Method Detail
-
destroy
void destroy()
-
isPrepared
static boolean isPrepared()
whether this helper is prepared
-
Async
static CompletableFuture<Void> Async(@NotNull() Runnable task)
just like default @Async, but not AsyncUncaughtExceptionHandler
-
Async
static <T> CompletableFuture<T> Async(@NotNull() Supplier<T> supplier)
just like default @Async, but not AsyncUncaughtExceptionHandler
-
AppTask
@NotNull() static AsyncTaskExecutor AppTask()
-
Lite
@NotNull() static AsyncTaskExecutor Lite()
-
ExecutorBuilder
@NotNull() static ThreadPoolTaskExecutorBuilder ExecutorBuilder()
Get ThreadPoolTaskExecutorBuilder, IllegalStateException if nonull but null.
-
-
-
-