public final class WorkerOptions extends Object
Modifier and Type | Method and Description |
---|---|
WorkerOptions |
beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Defines Spring BeanFactory instance to execute tasks with Spring's '@Autowired',
'@Value' or JSR-330's '@Inject' annotation.
|
static WorkerOptions |
defaults() |
WorkerOptions |
executorService(ExecutorService executorService)
Defines custom ExecutorService to execute tasks.
|
org.springframework.beans.factory.BeanFactory |
getBeanFactory() |
ExecutorService |
getExecutorService() |
int |
getWorkers() |
WorkerOptions |
workers(int workers)
Defines workers amount used to execute tasks.
|
public static WorkerOptions defaults()
public int getWorkers()
public WorkerOptions workers(int workers)
workers
- - workers amountpublic org.springframework.beans.factory.BeanFactory getBeanFactory()
public WorkerOptions beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
beanFactory
- - Spring BeanFactory instancepublic ExecutorService getExecutorService()
public WorkerOptions executorService(ExecutorService executorService)
Config.setExecutor(ExecutorService)
is used by default.executorService
- - custom ExecutorServiceCopyright © 2014–2019 Redisson. All rights reserved.