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, boolean useOptimization) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidvoidexecuteAgain(long jobId, String jobName, boolean disallowConcurrentExecution, int delayInMillis) getJobs()booleanisExistingJob(String jobName) Check if a job exists.booleanbooleanbooleanmayFireAgain(String jobName) voidvoidrescheduleJob(String triggerName, 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 specified) - however, the new trigger need not have the same name as the old trigger.TriggervoidvoidvoidsetBOSSchedulerService(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, boolean useOptimization)
-
-
Method Details
-
setJobListeners
-
setBOSSchedulerService
- Specified by:
setBOSSchedulerServicein interfaceSchedulerExecutor
-
schedule
public void schedule(long jobId, String jobName, Trigger trigger, boolean disallowConcurrentExecution) throws SSchedulerException - Specified by:
schedulein interfaceSchedulerExecutor- Throws:
SSchedulerException
-
executeAgain
public void executeAgain(long jobId, 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 job- Returns:
- True if the job exists, else False.
- Throws:
SSchedulerException
-
getJobs
- Specified by:
getJobsin 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
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 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 replacetriggerStartTime- The start date of the new trigger- Returns:
nullif aTriggerwith the given name 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
-