Class TaskSchedule.FixedRate

  • Enclosing class:
    TaskSchedule

    public static class TaskSchedule.FixedRate
    extends TaskSchedule
    Schedule for a task that should be run immediately and then repeated indefinitely at the specified rate. This means that each run is started at time n * interval milliseconds after the start of the first task. An iteration may be skipped if a run takes longer than "interval" milliseconds.
    • Constructor Detail

      • FixedRate

        public FixedRate​(long interval)
        Constructs a new fixed rate schedule.
        Parameters:
        interval - the interval in milliseconds
    • Method Detail

      • getInterval

        public long getInterval()
        Returns the interval in milliseconds.
        Returns:
        the interval in milliseconds