@Configuration
@EnableScheduling
public class TaskConfig
extends java.lang.Object
| Constructor and Description |
|---|
TaskConfig() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.core.task.AsyncTaskExecutor |
genieAsyncTaskExecutor(int poolSize)
Get a task executor for executing tasks asynchronously that don't need to be scheduled at a recurring rate.
|
org.springframework.core.task.SyncTaskExecutor |
genieSyncTaskExecutor()
Synchronous task executor.
|
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler |
genieTaskScheduler(int poolSize)
Get a task scheduler.
|
org.apache.commons.exec.Executor |
processExecutor()
Get an
Executor to use for executing processes from tasks. |
@Bean public org.apache.commons.exec.Executor processExecutor()
Executor to use for executing processes from tasks.@Bean
public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler genieTaskScheduler(@Value(value="${genie.tasks.scheduler.pool.size:1}")
int poolSize)
poolSize - The initial size of the thread pool that should be allocated@Bean
public org.springframework.core.task.AsyncTaskExecutor genieAsyncTaskExecutor(@Value(value="${genie.tasks.executor.pool.size:1}")
int poolSize)
poolSize - The number of threads desired for this system. Likely best to do one more than number of CPUs@Bean public org.springframework.core.task.SyncTaskExecutor genieSyncTaskExecutor()