Class DynamicSchedulerFactory
java.lang.Object
com.andaily.service.scheduler.dynamic.DynamicSchedulerFactory
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public final class DynamicSchedulerFactory
extends Object
implements org.springframework.beans.factory.InitializingBean
对JOb操作的核心类
- Author:
- Shengzhao Li
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic booleanexistedJob(DynamicJob job) Checking the job is existed or not 检查JOB是否存在static booleanpauseJob(DynamicJob existJob) Pause exist job 暂停已经存在的JOBstatic booleanregisterJob(DynamicJob job) Register a job 添加(注册)一个动态的JOBstatic booleanremoveJob(DynamicJob existJob) Remove exists job 删除一个已经存在的JOBstatic booleanresumeJob(DynamicJob existJob) Resume exist job 重启一个JOBvoidsetScheduler(org.quartz.Scheduler scheduler)
-
Constructor Details
-
DynamicSchedulerFactory
public DynamicSchedulerFactory()
-
-
Method Details
-
registerJob
Register a job 添加(注册)一个动态的JOB- Parameters:
job- DynamicJob- Returns:
- True is register successful
- Throws:
org.quartz.SchedulerException- e
-
pauseJob
Pause exist job 暂停已经存在的JOB- Throws:
org.quartz.SchedulerException
-
resumeJob
Resume exist job 重启一个JOB- Throws:
org.quartz.SchedulerException
-
existedJob
Checking the job is existed or not 检查JOB是否存在- Parameters:
job- Job- Returns:
- True is existed, otherwise false
- Throws:
org.quartz.SchedulerException- e
-
removeJob
Remove exists job 删除一个已经存在的JOB- Parameters:
existJob- A DynamicJob which exists in Scheduler- Returns:
- True is remove successful
- Throws:
org.quartz.SchedulerException- e
-
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-