Package com.logicaldoc.core.job
Class JobManager
java.lang.Object
com.logicaldoc.core.job.JobManager
Facade on Quartz scheduler
- Since:
- 8.7.4
- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionRetrieves all the job groupsorg.quartz.JobDetailList<org.quartz.JobDetail> Retrieves the jobsgetMissfireInstruction(String group) What policy to use in case of missfireintgetMissfireMax(String group) Max number of days to look in the past for missfired triggersorg.quartz.TriggergetTrigger(String name, String group) List<org.quartz.Trigger> getTriggers(String group, Long tenantId) Retrieves the triggersList<org.quartz.Trigger> getTriggersOfJob(String name, String group) voidSchedules a new JobvoidSchedules a new JobvoidscheduleNow(AbstractJob job, Map<String, Object> dictionary) Immediately runs a JobvoidunscheduleJob(String name, String group) voidunscheduleTrigger(String name, String group) 
- 
Field Details- 
JOB- See Also:
 
- 
TENANT_ID- See Also:
 
- 
MISSFIRE_RUNNOW- See Also:
 
- 
MISSFIRE_IGNORE- See Also:
 
 
- 
- 
Constructor Details- 
JobManagerpublic JobManager()
 
- 
- 
Method Details- 
schedulepublic void schedule(AbstractJob job, Map<String, Object> dictionary, Object... triggers) throws org.quartz.SchedulerExceptionSchedules a new Job- Parameters:
- job- the Job to schedule
- dictionary- map of data to assign at fire-time to the Job
- triggers- they can be a Date(instant to fire the job) or a String(cron expression)
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
schedulepublic void schedule(AbstractJob job, Map<String, Object> dictionary, Map<Object, throws org.quartz.SchedulerExceptionMap<String, Object>> triggers) Schedules a new Job- Parameters:
- job- the Job to schedule
- dictionary- map of data to assign at fire-time to the Job
- triggers- map of triggers, the key is a Date(instant to fire the job) or a String(cron expression) and the value is the map of data to pass at fire-time to the trigger
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
scheduleNowpublic void scheduleNow(AbstractJob job, Map<String, Object> dictionary) throws org.quartz.SchedulerExceptionImmediately runs a Job- Parameters:
- job- the Job to schedule
- dictionary- map of data to assign at fire-time to the Job
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
getMissfireInstructionWhat policy to use in case of missfire- Parameters:
- group- the group name
- Returns:
- JobManager.MISSFIRE_RUNNOW or JobManager.MISSFIRE_IGNORE
 
- 
getMissfireMaxMax number of days to look in the past for missfired triggers- Parameters:
- group- the group name
- Returns:
- max number of days
 
- 
getGroupsRetrieves all the job groups- Returns:
- list of groups
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
getJobspublic List<org.quartz.JobDetail> getJobs(String group, Long tenantId) throws org.quartz.SchedulerException Retrieves the jobs- Parameters:
- group- name of the group or null to retrieve all the jobs
- tenantId- filter on the tenant
- Returns:
- list of job details ordered by group and name
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
getJob- Throws:
- org.quartz.SchedulerException
 
- 
getTriggersOfJobpublic List<org.quartz.Trigger> getTriggersOfJob(String name, String group) throws org.quartz.SchedulerException - Throws:
- org.quartz.SchedulerException
 
- 
unscheduleJob- Throws:
- org.quartz.SchedulerException
 
- 
unscheduleTrigger- Throws:
- org.quartz.SchedulerException
 
- 
getTriggerspublic List<org.quartz.Trigger> getTriggers(String group, Long tenantId) throws org.quartz.SchedulerException Retrieves the triggers- Parameters:
- group- name of the group or null to retrieve all the triggers
- tenantId- filter on the tenant
- Returns:
- list of triggers ordered by group and name
- Throws:
- org.quartz.SchedulerException- error in the scheduler
 
- 
getTriggerpublic org.quartz.Trigger getTrigger(String name, String group) throws org.quartz.SchedulerException - Throws:
- org.quartz.SchedulerException
 
 
-