@NonNullByDefault public interface PeriodicScheduler
Scheduler that runs the same job at the given periods.
- Peter Kriens - Initial contribution, Simon Kaufmann - adapted to CompletableFutures, Hilbrand Bouwkamp - moved periodic scheduling to it's own interface
scheduleSchedule a runnable to be executed in definitely at the given delays. Schedules the job based on the given delay. If no more delays are present, the last value is re-used. The method returns a
ScheduledCompletableFuturethat can be used to stop scheduling. This is a fixed rate scheduler. That is, a base time is established when this method is called and subsequent firings are always calculated relative to this start time.
runnable- the runnable to run after each duration
delays- subsequent delays
- returns a
ScheduledCompletableFutureto cancel the schedule