Package de.xima.fc.timing
Class TriggerFactory
- java.lang.Object
-
- de.xima.fc.timing.TriggerFactory
-
public class TriggerFactory extends Object
Helper methods for creating quartz triggers.- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description TriggerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.quartz.Trigger
getCronTrigger(org.quartz.TriggerKey triggerKey, org.quartz.CronExpression cronExpression, boolean ignoreMisfired)
static org.quartz.Trigger
getDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired)
static org.quartz.Trigger
getDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired)
static org.quartz.Trigger
getDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired)
-
-
-
Method Detail
-
getDateTrigger
public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Date startDate, boolean ignoreMisfired)
- Parameters:
triggerKey
-TriggerKey
to use for the triggerstartDate
-Date
when the trigger should fireignoreMisfired
-true
if misfired triggers should be ignored,false
otherwise- Returns:
Trigger
the created trigger
-
getDateTrigger
public static org.quartz.Trigger getDateTrigger(org.quartz.TriggerKey triggerKey, Instant startInstant, boolean ignoreMisfired)
- Parameters:
triggerKey
-TriggerKey
to use for the triggerstartInstant
-Instant
when the trigger should fireignoreMisfired
-true
if misfired triggers should be ignored,false
otherwise- Returns:
Trigger
the created trigger
-
getDelayTrigger
public static org.quartz.Trigger getDelayTrigger(org.quartz.TriggerKey triggerKey, int delay, org.quartz.DateBuilder.IntervalUnit delayUnit, boolean ignoreMisfired)
- Parameters:
triggerKey
-TriggerKey
to 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
-true
if misfired triggers should be ignored,false
otherwise- 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
-TriggerKey
to use for the triggercronExpression
- Cron expression for when the trigger should fire.ignoreMisfired
-true
if misfired triggers should be ignored,false
otherwise- Returns:
- The newly created trigger for the given cron expression.
-
-