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
@Alternative
bean 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 ExecutorService
get()
Provides the thread pool for executing@Asynchronous
methods and other asynchronous tasks.protected ThreadFactory
threadFactory()
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:AsyncExecutorProvider
Provides the thread pool for executing@Asynchronous
methods and other asynchronous tasks. Integrator is responsible for the thread pool's lifecycle.- Specified by:
get
in 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.
-
-