Interface TimeSchedule

All Superinterfaces:
Serializable

public interface TimeSchedule extends Serializable
A time schedule states when something is due: at a first time and, if it has a period, again and again. The period counts either from the previous due time (fixed rate), so that the due times are the first time plus a multiple of the period, or from the end of the previous occurrence (fixed delay). What an occurrence is and when it ends depends on what the schedule triggers; the schedule knows nothing about it.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    The default serial version UID.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the first due time of this schedule.
    Gets the period of this schedule, a Duration for a fixed length of time, such as minutes or hours, or a Period for calendar days, weeks or months.
    boolean
    Gets whether the period of this schedule counts from the previous due time (fixed rate) or from the end of the previous occurrence (fixed delay).
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      The default serial version UID.
      See Also:
  • Method Details

    • getDate

      ZonedDateTime getDate()
      Gets the first due time of this schedule.
      Returns:
      The first due time of this schedule.
    • getPeriod

      TemporalAmount getPeriod()
      Gets the period of this schedule, a Duration for a fixed length of time, such as minutes or hours, or a Period for calendar days, weeks or months.
      Returns:
      The period of this schedule or null if it is due only once.
    • isFixedRate

      boolean isFixedRate()
      Gets whether the period of this schedule counts from the previous due time (fixed rate) or from the end of the previous occurrence (fixed delay).
      Returns:
      Whether the period of this schedule counts from the previous due time. This is false for a schedule without a period.