Interface TimedExecutor
- All Known Implementing Classes:
MinuteTimer
,MinuteTimerAsync
,Scheduler
public interface TimedExecutor
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
CancelTimedExecutor.TimedTask
.now()
Get the Executors currentZonedDateTime
.schedule
(ZonedDateTime at, Consumer<ZonedDateTime> task) Execute the given task at the given dateTime.
-
Method Details
-
schedule
Execute the given task at the given dateTime.- Parameters:
at
- time to execute attask
- task to execute- Returns:
- reference to Task as
TimedExecutor.TimedTask
Can be used to cancel the task.
-
cancel
CancelTimedExecutor.TimedTask
.- Parameters:
task
- to remove
-
now
ZonedDateTime now()Get the Executors currentZonedDateTime
. Should be used to calculate execution time.- Returns:
- current
ZonedDateTime
-