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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves all the job groupsorg.quartz.JobDetail
List<org.quartz.JobDetail>
Retrieves the jobsgetMissfireInstruction
(String group) What policy to use in case of missfireint
getMissfireMax
(String group) Max number of days to look in the past for missfired triggersorg.quartz.Trigger
getTrigger
(String name, String group) List<org.quartz.Trigger>
getTriggers
(String group, Long tenantId) Retrieves the triggersList<org.quartz.Trigger>
getTriggersOfJob
(String name, String group) void
Schedules a new Jobvoid
Schedules a new Jobvoid
unscheduleJob
(String name, String group) void
unscheduleTrigger
(String name, String group)
-
Field Details
-
TENANT_ID
- See Also:
-
MISSFIRE_RUNNOW
- See Also:
-
MISSFIRE_IGNORE
- See Also:
-
-
Constructor Details
-
JobManager
public JobManager()
-
-
Method Details
-
schedule
public void schedule(AbstractJob job, Map<String, Object> dictionary, Object... triggers) throws org.quartz.SchedulerExceptionSchedules a new Job- Parameters:
job
- the Job to scheduledictionary
- map of data to assign at fire-time to the Jobtriggers
- they can be a Date(instant to fire the job) or a String(cron expression)- Throws:
org.quartz.SchedulerException
- error in the scheduler
-
schedule
public 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 scheduledictionary
- map of data to assign at fire-time to the Jobtriggers
- 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
-
getMissfireInstruction
What policy to use in case of missfire- Parameters:
group
- the group name- Returns:
- JobManager.MISSFIRE_RUNNOW or JobManager.MISSFIRE_IGNORE
-
getMissfireMax
Max number of days to look in the past for missfired triggers- Parameters:
group
- the group name- Returns:
- max number of days
-
getGroups
Retrieves all the job groups- Returns:
- list of groups
- Throws:
org.quartz.SchedulerException
- error in the scheduler
-
getJobs
public 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 jobstenantId
- 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
-
getTriggersOfJob
public 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
-
getTriggers
public 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 triggerstenantId
- filter on the tenant- Returns:
- list of triggers ordered by group and name
- Throws:
org.quartz.SchedulerException
- error in the scheduler
-
getTrigger
public org.quartz.Trigger getTrigger(String name, String group) throws org.quartz.SchedulerException - Throws:
org.quartz.SchedulerException
-