public class ScheduleJobManager
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
void |
addJob(java.lang.String name,
java.lang.String group,
java.lang.String jobDescription,
java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz,
java.util.List<com.fr.third.v2.org.quartz.Trigger> triggers,
java.util.Map<java.lang.String,java.lang.Object> jobInformation)
添加任务
|
void |
addJob(java.lang.String name,
java.lang.String group,
java.lang.String jobDescription,
java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz,
com.fr.third.v2.org.quartz.Trigger trigger,
com.fr.third.v2.org.quartz.JobDataMap jobDataMap)
添加任务
|
void |
addJob(java.lang.String name,
java.lang.String group,
java.lang.String jobDescription,
java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz,
com.fr.third.v2.org.quartz.Trigger trigger,
java.util.Map<java.lang.String,java.lang.Object> jobInformation)
添加任务
|
boolean |
checkJobIsExecuting(java.lang.String jobName)
检查任务以及子任务是否正在执行中
|
boolean |
checkJobIsExist(java.lang.String jobName,
java.lang.String jobGroup)
检查任务是否存在
|
void |
destroy() |
java.lang.String[] |
getCurrentlyExecutingJobNames()
获取当前正在执行的任务名称
|
static ScheduleJobManager |
getInstance() |
java.util.List<Pair<com.fr.third.v2.org.quartz.JobListener,ScheduleJobListenerFilter>> |
getJobListeners()
获取调度任务的监听器
|
java.util.Date |
getJobNextFireTime(java.lang.String jobName,
java.lang.String jobGroup)
获取任务下次执行时间(有多个触发器的情况下,取最小值)
|
java.util.Date |
getTriggersNextFireTime(java.util.List<com.fr.third.v2.org.quartz.Trigger> triggers)
获取触发器下次执行时间(有多个触发器的情况下,取最小值)
|
void |
init() |
void |
pauseJob(java.lang.String name,
java.lang.String group)
暂停任务
|
void |
registerJobListener(com.fr.third.v2.org.quartz.JobListener jobListener,
ScheduleJobListenerFilter filter)
注册一个调度任务的监听器
|
void |
removeJob(java.lang.String name,
java.lang.String group)
删除任务
|
void |
resumeJob(java.lang.String name,
java.lang.String group)
继续任务
|
public void init()
public void destroy()
public static ScheduleJobManager getInstance()
public void addJob(java.lang.String name, java.lang.String group, java.lang.String jobDescription, java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz, java.util.List<com.fr.third.v2.org.quartz.Trigger> triggers, java.util.Map<java.lang.String,java.lang.Object> jobInformation)
name
- 任务名称group
- 任务组jobDescription
- 任务描述clazz
- job类triggers
- 触发器组jobInformation
- 任务信息(map)public void addJob(java.lang.String name, java.lang.String group, java.lang.String jobDescription, java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz, com.fr.third.v2.org.quartz.Trigger trigger, java.util.Map<java.lang.String,java.lang.Object> jobInformation) throws java.lang.Exception
name
- 任务名称group
- 任务组jobDescription
- 任务描述clazz
- job类trigger
- 单个触发器jobInformation
- 任务信息(objMap)java.lang.Exception
public void addJob(java.lang.String name, java.lang.String group, java.lang.String jobDescription, java.lang.Class<? extends com.fr.third.v2.org.quartz.Job> clazz, com.fr.third.v2.org.quartz.Trigger trigger, com.fr.third.v2.org.quartz.JobDataMap jobDataMap)
name
- 任务名称group
- 任务组jobDescription
- 任务描述clazz
- job类trigger
- 单个触发器jobDataMap
- 任务信息(jobDataMap)public void removeJob(java.lang.String name, java.lang.String group)
name
- 任务名称group
- 任务组public void pauseJob(java.lang.String name, java.lang.String group)
name
- 任务名称group
- 任务组public void resumeJob(java.lang.String name, java.lang.String group)
name
- 任务名称group
- 任务组public java.lang.String[] getCurrentlyExecutingJobNames()
public boolean checkJobIsExecuting(java.lang.String jobName)
jobName
- 任务名称public java.util.Date getTriggersNextFireTime(java.util.List<com.fr.third.v2.org.quartz.Trigger> triggers)
triggers
- 触发器public java.util.Date getJobNextFireTime(java.lang.String jobName, java.lang.String jobGroup)
jobName
- 任务名称jobGroup
- 任务组public boolean checkJobIsExist(java.lang.String jobName, java.lang.String jobGroup)
jobName
- 任务名称public void registerJobListener(com.fr.third.v2.org.quartz.JobListener jobListener, ScheduleJobListenerFilter filter)
jobListener
- 任务监听public java.util.List<Pair<com.fr.third.v2.org.quartz.JobListener,ScheduleJobListenerFilter>> getJobListeners()