Package dev.webfx.platform.scheduler.spi
Interface SchedulerProvider
- All Known Subinterfaces:
UiSchedulerProvider
- All Known Implementing Classes:
SchedulerProviderBase
,UiSchedulerProviderBase
public interface SchedulerProvider
This class provides low-level task scheduling primitives.
- Author:
- Bruno Salmon
-
Method Summary
Modifier and TypeMethodDescriptionrunInBackground
(Runnable runnable) scheduleDeferred
(Runnable runnable) A deferred command is executed not now but as soon as possible (ex: after the event loop returns).scheduleDelay
(long delayMs, Runnable runnable) Set a one-shot timer to fire afterdelayMs
milliseconds, at which pointhandler
will be called.schedulePeriodic
(long delayMs, Runnable runnable) Schedules a repeating handler that is scheduled with a constant periodicity.default Scheduled
schedulePeriodic
(long delayMs, Consumer<Scheduled> runnable) int
tasksCount
(boolean includeDeferred, boolean includePeriodic, boolean includeBackground, boolean includePending, boolean includeRunning) default void
wakeUp()
-
Method Details
-
scheduleDeferred
A deferred command is executed not now but as soon as possible (ex: after the event loop returns). -
scheduleDelay
Set a one-shot timer to fire afterdelayMs
milliseconds, at which pointhandler
will be called.- Returns:
- the timer
-
schedulePeriodic
Schedules a repeating handler that is scheduled with a constant periodicity. That is, the handler will be invoked everydelayMs
milliseconds, regardless of how long the previous invocation took to complete.- Parameters:
delayMs
- the period with which the handler is executedrunnable
- the handler to execute- Returns:
- the timer
-
schedulePeriodic
-
runInBackground
-
runOnIdle
-
tasksCount
int tasksCount(boolean includeDeferred, boolean includePeriodic, boolean includeBackground, boolean includePending, boolean includeRunning) -
wakeUp
default void wakeUp()
-