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 of
AsyncExecutorProvider.
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
ConstructorsConstructorDescriptionDefaultAsyncExecutorProvider(OptionalInt mainThreadPoolSize, OptionalInt mainThreadPoolQueueSize, OptionalInt globalThreadPoolSize) -
Method Summary
Modifier and TypeMethodDescriptionget()Provides the thread pool for executing@Asynchronousmethods and other asynchronous tasks.protected ThreadFactoryCan be overridden in a subclass to provide a differentThreadFactory.
-
Constructor Details
-
DefaultAsyncExecutorProvider
@Inject public DefaultAsyncExecutorProvider(OptionalInt mainThreadPoolSize, OptionalInt mainThreadPoolQueueSize, OptionalInt globalThreadPoolSize)
-
-
Method Details
-
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
Can be overridden in a subclass to provide a differentThreadFactory. Useful e.g. in a Jakarta EE container, where the threads must be managed.
-