Package de.xima.fc.timing
Class TriggerFactory
java.lang.Object
de.xima.fc.timing.TriggerFactory
Helper methods for creating quartz triggers.
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.quartz.TriggergetCronTrigger(org.quartz.TriggerKey triggerKey, org.quartz.CronExpression cronExpression, boolean ignoreMisfired) static org.quartz.TriggergetDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired) static org.quartz.TriggergetDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired) static org.quartz.TriggergetDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired)
-
Constructor Details
-
TriggerFactory
public TriggerFactory()
-
-
Method Details
-
getDateTrigger
public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired) - Parameters:
triggerKey-TriggerKeyto use for the triggerstartDate-Datewhen the trigger should fireignoreMisfired-trueif misfired triggers should be ignored,falseotherwise- Returns:
Triggerthe created trigger
-
getDateTrigger
public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired) - Parameters:
triggerKey-TriggerKeyto use for the triggerstartInstant-Instantwhen the trigger should fireignoreMisfired-trueif misfired triggers should be ignored,falseotherwise- Returns:
Triggerthe created trigger
-
getDelayTrigger
public static org.quartz.Trigger getDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired) - Parameters:
triggerKey-TriggerKeyto use for the triggerdelay- Delay for the trigger when it should fire. The trigger fires after this amount of time relative to NOW.delayUnit- Unit of the given delay.ignoreMisfired-trueif misfired triggers should be ignored,falseotherwise- Returns:
- The newly created trigger for the given delay.
-
getCronTrigger
public static org.quartz.Trigger getCronTrigger(org.quartz.TriggerKey triggerKey, org.quartz.CronExpression cronExpression, boolean ignoreMisfired) - Parameters:
triggerKey-TriggerKeyto use for the triggercronExpression- Cron expression for when the trigger should fire.ignoreMisfired-trueif misfired triggers should be ignored,falseotherwise- Returns:
- The newly created trigger for the given cron expression.
-