public class TaskExecutorManager extends Object implements Serializable
此类用于管理正在运行的作业情况,作业启动后加入任务列表,任务结束移除
Constructor and Description |
---|
TaskExecutorManager(Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
List<TaskExecutor> |
getExecutors()
获取所有正在执行的任务调度执行器
|
TaskExecutorManager |
notifyExecutorCompleted(TaskExecutor executor)
执行器执行完毕调用此方法,将执行器从执行器列表移除,此方法由
TaskExecutor 对象调用,用于通知管理器自身已完成执行 |
TaskExecutor |
spawnExecutor(CronTask task)
启动 执行器TaskExecutor,即启动作业
|
protected Scheduler scheduler
public TaskExecutorManager(Scheduler scheduler)
public List<TaskExecutor> getExecutors()
public TaskExecutor spawnExecutor(CronTask task)
task
- Task
TaskExecutor
public TaskExecutorManager notifyExecutorCompleted(TaskExecutor executor)
TaskExecutor
对象调用,用于通知管理器自身已完成执行executor
- 执行器 TaskExecutor
Copyright © 2024. All rights reserved.