Class QuartzSchedulerExecutor
- java.lang.Object
-
- org.bonitasoft.engine.scheduler.impl.QuartzSchedulerExecutor
-
- All Implemented Interfaces:
SchedulerExecutor
public class QuartzSchedulerExecutor extends java.lang.Object implements SchedulerExecutor
- Author:
- Matthieu Chaffotte, Yanyan Liu, Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description QuartzSchedulerExecutor(BonitaSchedulerFactory schedulerFactory, TransactionService transactionService, SessionAccessor sessionAccessor, boolean useOptimization)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete(java.lang.String jobName, java.lang.String groupName)voiddeleteJobs(java.lang.String groupName)voidexecuteAgain(long jobId, java.lang.String groupName, java.lang.String jobName, boolean disallowConcurrentExecution, int delayInMillis)java.util.List<java.lang.String>getAllJobs()java.util.List<java.lang.String>getJobs(java.lang.String groupName)java.util.Set<java.lang.String>getPausedTriggerGroups()booleanisExistingJob(java.lang.String jobName, java.lang.String groupName)Check if a job exists.booleanisShutdown()booleanisStarted()booleanmayFireAgain(java.lang.String groupName, java.lang.String jobName)voidpauseJobs(java.lang.String groupName)voidrescheduleErroneousTriggers()java.util.DaterescheduleJob(java.lang.String triggerName, java.lang.String groupName, java.util.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(java.lang.String groupName)voidschedule(long jobId, java.lang.String groupName, java.lang.String jobName, Trigger trigger, boolean disallowConcurrentExecution)voidsetBOSSchedulerService(SchedulerServiceImpl schedulerService)voidsetJobListeners(java.util.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 Detail
-
QuartzSchedulerExecutor
public QuartzSchedulerExecutor(BonitaSchedulerFactory schedulerFactory, TransactionService transactionService, SessionAccessor sessionAccessor, boolean useOptimization)
-
-
Method Detail
-
setJobListeners
public void setJobListeners(java.util.List<BonitaJobListener> jobListeners)
-
setBOSSchedulerService
public void setBOSSchedulerService(SchedulerServiceImpl schedulerService)
- Specified by:
setBOSSchedulerServicein interfaceSchedulerExecutor
-
schedule
public void schedule(long jobId, java.lang.String groupName, java.lang.String jobName, Trigger trigger, boolean disallowConcurrentExecution) throws SSchedulerException- Specified by:
schedulein interfaceSchedulerExecutor- Throws:
SSchedulerException
-
executeAgain
public void executeAgain(long jobId, java.lang.String groupName, java.lang.String jobName, boolean disallowConcurrentExecution, int delayInMillis) throws SSchedulerException- Specified by:
executeAgainin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isStarted
public boolean isStarted() throws SSchedulerException- Specified by:
isStartedin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isShutdown
public boolean isShutdown() throws SSchedulerException- Specified by:
isShutdownin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
start
public void start() throws SSchedulerExceptionDescription 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
public void shutdown() throws SSchedulerExceptionDescription 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
public boolean delete(java.lang.String jobName, java.lang.String groupName) throws SSchedulerException- Specified by:
deletein interfaceSchedulerExecutor- Throws:
SSchedulerException
-
deleteJobs
public void deleteJobs(java.lang.String groupName) throws SSchedulerException- Specified by:
deleteJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
isExistingJob
public boolean isExistingJob(java.lang.String jobName, java.lang.String groupName) throws SSchedulerExceptionDescription 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
public java.util.List<java.lang.String> getJobs(java.lang.String groupName) throws SSchedulerException- Specified by:
getJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
getAllJobs
public java.util.List<java.lang.String> getAllJobs() throws SSchedulerException- Specified by:
getAllJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
mayFireAgain
public boolean mayFireAgain(java.lang.String groupName, java.lang.String jobName) throws SSchedulerException- Specified by:
mayFireAgainin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
rescheduleErroneousTriggers
public void rescheduleErroneousTriggers() throws SSchedulerException- Specified by:
rescheduleErroneousTriggersin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
pauseJobs
public void pauseJobs(java.lang.String groupName) throws SSchedulerException- Specified by:
pauseJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
resumeJobs
public void resumeJobs(java.lang.String groupName) throws SSchedulerException- Specified by:
resumeJobsin interfaceSchedulerExecutor- Throws:
SSchedulerException
-
rescheduleJob
public java.util.Date rescheduleJob(java.lang.String triggerName, java.lang.String groupName, java.util.Date triggerStartTime) throws SSchedulerExceptionDescription 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
public java.util.Set<java.lang.String> getPausedTriggerGroups() throws SSchedulerException- Throws:
SSchedulerException
-
-