Package io.smallrye.faulttolerance
Class DefaultAsyncExecutorProvider
- java.lang.Object
-
- io.smallrye.faulttolerance.DefaultAsyncExecutorProvider
-
- All Implemented Interfaces:
AsyncExecutorProvider
@Singleton public class DefaultAsyncExecutorProvider extends Object implements AsyncExecutorProvider
Default implementation ofAsyncExecutorProvider. Manages its own thread pool.If integrators don't want to manage the fault tolerance thread pool, yet still want to customize the thread factory, they can provide an
@Alternativebean which inherits from this class.
-
-
Constructor Summary
Constructors Constructor Description DefaultAsyncExecutorProvider(OptionalInt mainThreadPoolSize, OptionalInt mainThreadPoolQueueSize, OptionalInt globalThreadPoolSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutorServiceget()Provides the thread pool for executing@Asynchronousmethods and other asynchronous tasks.protected ThreadFactorythreadFactory()Can be overridden in a subclass to provide a differentThreadFactory.
-
-
-
Constructor Detail
-
DefaultAsyncExecutorProvider
@Inject public DefaultAsyncExecutorProvider(OptionalInt mainThreadPoolSize, OptionalInt mainThreadPoolQueueSize, OptionalInt globalThreadPoolSize)
-
-
Method Detail
-
get
public ExecutorService get()
Description copied from interface:AsyncExecutorProviderProvides the thread pool for executing@Asynchronousmethods and other asynchronous tasks. Integrator is responsible for the thread pool's lifecycle.- Specified by:
getin interfaceAsyncExecutorProvider
-
threadFactory
protected ThreadFactory threadFactory()
Can be overridden in a subclass to provide a differentThreadFactory. Useful e.g. in a Jakarta EE container, where the threads must be managed.
-
-