java.lang.Object
net.datenwerke.scheduler.service.scheduler.entities.AbstractTrigger
net.datenwerke.scheduler.service.scheduler.triggers.complex.DateTrigger<C>
Direct Known Subclasses:
DailyNthdayTrigger, DailyWorkdayTrigger, MonthlyNamedDayTrigger, MonthlyNthDayMthMonthTrigger, WeeklyTrigger, YearlyAtDateTrigger, YearlyNamedDayTrigger
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

public abstract class DateTrigger<C extends DateTriggerConfig> extends AbstractTrigger
  • Constructor Details

    • DateTrigger

      public DateTrigger()
    • DateTrigger

      public DateTrigger(C config)
  • Method Details

    • setConfig

      public void setConfig(C config)
    • getConfig

      public C getConfig()
    • getFirstFireTimeOfDay

      public Date getFirstFireTimeOfDay(Date day)
      Returns the given date with the time component set to the time of the first execution of the trigger at this day. Does not check if the trigger does fire at this day at all.
      Parameters:
      day -
    • getLastFireTimeOfDay

      public Date getLastFireTimeOfDay(Date day)
      Sets the time component of the supplied date to the time, the trigger fires the last time at this date. Does not check, if the trigger fires at this dayat all
      Parameters:
      day -
    • getNthFireTimeOfDayAfter

      public Date getNthFireTimeOfDayAfter(Date day, int n)
      Returns the supplied date, with its time component set to the time of the nth execution of the trigger after the time given Does not check if the trigger fires at all
      Parameters:
      day -
      n -
      Throws:
      IllegalArgumentException
    • getNthFireTimeOfDay

      public Date getNthFireTimeOfDay(Date day, int n)
      returns the given date with the time part set to the time of the nth execution.
      Parameters:
      day -
      n -
    • getFiringsPerDay

      public int getFiringsPerDay()
      returns how many times the trigger fires in one day
    • consumes

      public boolean consumes(DateTriggerConfig config)
    • getFinalFireTime

      public Date getFinalFireTime()
    • getFinalFireTime

      public Date getFinalFireTime(Date lastFireTime)
    • computeNextFireTime

      public Date computeNextFireTime(Date afterTime)
      Specified by:
      computeNextFireTime in class AbstractTrigger
    • getNextScheduleTimes

      public List<Date> getNextScheduleTimes(int times)
      Overrides:
      getNextScheduleTimes in class AbstractTrigger