Class QuartzSchedulerExecutor
java.lang.Object
org.bonitasoft.engine.scheduler.impl.QuartzSchedulerExecutor
- All Implemented Interfaces:
SchedulerExecutor
- Author:
- Matthieu Chaffotte, Yanyan Liu, Celine Souchet
-
Constructor Summary
ConstructorsConstructorDescriptionQuartzSchedulerExecutor(BonitaSchedulerFactory schedulerFactory, TransactionService transactionService, SessionAccessor sessionAccessor, boolean useOptimization) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoiddeleteJobs(String groupName) voidexecuteAgain(long jobId, String groupName, String jobName, boolean disallowConcurrentExecution, int delayInMillis) booleanisExistingJob(String jobName, String groupName) Check if a job exists.booleanbooleanbooleanmayFireAgain(String groupName, String jobName) voidvoidrescheduleJob(String triggerName, String groupName, Date triggerStartTime) Remove (delete) thewith the given key, and store the new given one - which must be associated with the same job (the new trigger must have the job name & group specified) - however, the new trigger need not have the same name as the old trigger.TriggervoidresumeJobs(String groupName) voidschedule(long jobId, String groupName, String jobName, Trigger trigger, boolean disallowConcurrentExecution) voidsetBOSSchedulerService(SchedulerServiceImpl schedulerService) voidsetJobListeners(List<BonitaJobListener> jobListeners) voidshutdown()Note that once a scheduler is shutdown, it cannot be restarted without being re-instantiated.voidstart()Note that once a scheduler is shutdown, it cannot be restarted without being re-instantiated.
-
Constructor Details
-
QuartzSchedulerExecutor
public QuartzSchedulerExecutor(BonitaSchedulerFactory schedulerFactory, TransactionService transactionService, SessionAccessor sessionAccessor, boolean useOptimization)
-
-
Method Details
-
setJobListeners
-
setBOSSchedulerService
- Specified by:
setBOSSchedulerServicein interfaceSchedulerExecutor
-
schedule
public void schedule(long jobId, String groupName, String jobName, Trigger trigger, boolean disallowConcurrentExecution) throws SSchedulerException - Specified by:
schedulein interfaceSchedulerExecutor- Throws:
SSchedulerException
-
executeAgain
public void executeAgain(long jobId, String groupName, String jobName, boolean disallowConcurrentExecution, int delayInMillis) throws SSchedulerException - Specified by:
executeAgainin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isStarted
- Specified by:
isStartedin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isShutdown
- Specified by:
isShutdownin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
start
Description copied from interface:SchedulerExecutorNote that once a scheduler is shutdown, it cannot be restarted without being re-instantiated.- Specified by:
startin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
shutdown
Description copied from interface:SchedulerExecutorNote that once a scheduler is shutdown, it cannot be restarted without being re-instantiated.- Specified by:
shutdownin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
delete
- Specified by:
deletein interfaceSchedulerExecutor- Throws:
SSchedulerException
-
deleteJobs
- Specified by:
deleteJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isExistingJob
Description copied from interface:SchedulerExecutorCheck if a job exists.- Specified by:
isExistingJobin interfaceSchedulerExecutor- Parameters:
jobName- The name of the jobgroupName- The group of the job- Returns:
- True if the job exists, else False.
- Throws:
SSchedulerException
-
getJobs
- Specified by:
getJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
getAllJobs
- Specified by:
getAllJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
mayFireAgain
- Specified by:
mayFireAgainin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
rescheduleErroneousTriggers
- Specified by:
rescheduleErroneousTriggersin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
pauseJobs
- Specified by:
pauseJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
resumeJobs
- Specified by:
resumeJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
rescheduleJob
public Date rescheduleJob(String triggerName, String groupName, Date triggerStartTime) throws SSchedulerException Description copied from interface:SchedulerExecutorRemove (delete) thewith the given key, and store the new given one - which must be associated with the same job (the new trigger must have the job name & group specified) - however, the new trigger need not have the same name as the old trigger.Trigger- Specified by:
rescheduleJobin interfaceSchedulerExecutor- Parameters:
triggerName- The name of the trigger to replacegroupName- The group name of the trigger to replacetriggerStartTime- The start date of the new trigger- Returns:
nullif aTriggerwith the given name & group was not found and removed from the store (and the new trigger is therefore not stored), otherwise the first fire time of the newly scheduled trigger is returned.- Throws:
SSchedulerException
-
getPausedTriggerGroups
- Throws:
SSchedulerException
-