@Factory public class ExecutorFactory extends Object
ExecutorService
instances based on UserExecutorConfiguration
instances.Constructor and Description |
---|
ExecutorFactory(BeanLocator beanLocator,
ThreadFactory threadFactory) |
Modifier and Type | Method and Description |
---|---|
protected ThreadFactory |
eventLoopGroupThreadFactory(ExecutorConfiguration configuration)
Constructs an executor thread factory.
|
ExecutorService |
executorService(ExecutorConfiguration executorConfiguration)
Create the ExecutorService with the given configuration.
|
@Inject public ExecutorFactory(BeanLocator beanLocator, ThreadFactory threadFactory)
beanLocator
- The bean beanLocatorthreadFactory
- The factory to create new threads@EachBean(value=ExecutorConfiguration.class) protected ThreadFactory eventLoopGroupThreadFactory(ExecutorConfiguration configuration)
configuration
- The configuration@EachBean(value=ExecutorConfiguration.class) @Bean(preDestroy="shutdown") public ExecutorService executorService(ExecutorConfiguration executorConfiguration)
executorConfiguration
- The configuration to create a thread pool that creates new threads as needed