Class TasksAutoConfiguration
java.lang.Object
com.netflix.genie.web.spring.autoconfigure.tasks.TasksAutoConfiguration
@Configuration
@EnableScheduling
@EnableConfigurationProperties({TasksExecutorPoolProperties.class,TasksSchedulerPoolProperties.class})
public class TasksAutoConfiguration
extends Object
Configuration of beans for asynchronous tasks within Genie.
- Since:
- 3.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.task.AsyncTaskExecutor
genieAsyncTaskExecutor
(TasksExecutorPoolProperties tasksExecutorPoolProperties) Get a task executor for executing tasks asynchronously that don't need to be scheduled at a recurring rate.org.springframework.core.task.SyncTaskExecutor
Synchronous task executor.org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
genieTaskScheduler
(TasksSchedulerPoolProperties tasksSchedulerPoolProperties) Get a task scheduler.org.apache.commons.exec.Executor
Get anExecutor
to use for executing processes from tasks.
-
Constructor Details
-
TasksAutoConfiguration
public TasksAutoConfiguration()
-
-
Method Details
-
processExecutor
@Bean @ConditionalOnMissingBean(org.apache.commons.exec.Executor.class) public org.apache.commons.exec.Executor processExecutor()Get anExecutor
to use for executing processes from tasks.- Returns:
- The executor to use
-
genieTaskScheduler
@Bean @ConditionalOnMissingBean(name="genieTaskScheduler") public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler genieTaskScheduler(TasksSchedulerPoolProperties tasksSchedulerPoolProperties) Get a task scheduler.- Parameters:
tasksSchedulerPoolProperties
- The properties regarding the thread pool to use for task scheduling- Returns:
- The task scheduler
-
genieAsyncTaskExecutor
@Bean @ConditionalOnMissingBean(name="genieAsyncTaskExecutor") public org.springframework.core.task.AsyncTaskExecutor genieAsyncTaskExecutor(TasksExecutorPoolProperties tasksExecutorPoolProperties) Get a task executor for executing tasks asynchronously that don't need to be scheduled at a recurring rate.- Parameters:
tasksExecutorPoolProperties
- The properties for the task executor thread pool- Returns:
- The task executor the system to use
-
genieSyncTaskExecutor
@Bean @ConditionalOnMissingBean(name="genieSyncTaskExecutor") public org.springframework.core.task.SyncTaskExecutor genieSyncTaskExecutor()Synchronous task executor.- Returns:
- The synchronous task executor to use
-