@Immutable public final class TriggerUtils extends Object
ITriggers.ICronTrigger,
ISimpleTrigger,
DateBuilder| Modifier and Type | Method and Description |
|---|---|
static Date |
computeEndTimeToAllowParticularNumberOfFirings(IOperableTrigger trigg,
ICalendar cal,
int numTimes)
Compute the
Date that is 1 second after the Nth firing of the
given Trigger, taking the triger's associated
Calendar into consideration. |
static com.helger.commons.collection.impl.ICommonsList<Date> |
computeFireTimes(IOperableTrigger trigg,
ICalendar cal,
int numTimes)
Returns a list of Dates that are the next fire times of a
Trigger. |
static com.helger.commons.collection.impl.ICommonsList<Date> |
computeFireTimesBetween(IOperableTrigger trigg,
ICalendar cal,
Date from,
Date to)
Returns a list of Dates that are the next fire times of a
Trigger that fall within the given date range. |
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsList<Date> computeFireTimes(IOperableTrigger trigg, ICalendar cal, int numTimes)
Trigger. The input trigger will be cloned before any work is
done, so you need not worry about its state being altered by this method.trigg - The trigger upon which to do the workcal - The calendar to apply to the trigger's schedulenumTimes - The number of next fire times to producepublic static Date computeEndTimeToAllowParticularNumberOfFirings(IOperableTrigger trigg, ICalendar cal, int numTimes)
Date that is 1 second after the Nth firing of the
given Trigger, taking the triger's associated
Calendar into consideration. The input trigger will be cloned
before any work is done, so you need not worry about its state being
altered by this method.trigg - The trigger upon which to do the workcal - The calendar to apply to the trigger's schedulenumTimes - The number of next fire times to producepublic static com.helger.commons.collection.impl.ICommonsList<Date> computeFireTimesBetween(IOperableTrigger trigg, ICalendar cal, Date from, Date to)
Trigger that fall within the given date range. The input
trigger will be cloned before any work is done, so you need not worry about
its state being altered by this method.
NOTE: if this is a trigger that has previously fired within the given date range, then firings which have already occurred will not be listed in the output List.
trigg - The trigger upon which to do the workcal - The calendar to apply to the trigger's schedulefrom - The starting date at which to find fire timesto - The ending date at which to stop finding fire timesCopyright © 2016–2021 Philip Helger. All rights reserved.