Package io.deephaven.server.util
Interface Scheduler
- All Superinterfaces:
Clock
- All Known Implementing Classes:
Scheduler.DelegatingImpl
The Scheduler is used to schedule tasks that should execute at a future time.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanvoidrunAfterDelay(long delayMs, @NotNull Runnable command) Schedule this task to run at the specified time.voidSchedule this task to run at the specified time.voidrunImmediately(@NotNull Runnable command) Schedule this task to run immediately.voidrunSerially(@NotNull Runnable command) Schedule this task to run immediately, under the exclusive UGP lock.Methods inherited from interface io.deephaven.base.clock.Clock
currentTimeMicros, currentTimeMillis, currentTimeNanos, instantMillis, instantNanos
-
Method Details
-
runAtTime
Schedule this task to run at the specified time.- Parameters:
epochMillis- when to run this taskcommand- the task to run
-
runAfterDelay
Schedule this task to run at the specified time.- Parameters:
delayMs- how long to delay before running this task (in milliseconds)command- the task to run
-
runImmediately
Schedule this task to run immediately.- Parameters:
command- the task to run
-
runSerially
Schedule this task to run immediately, under the exclusive UGP lock.- Parameters:
command- the task to run
-
inTestMode
default boolean inTestMode()- Returns:
- whether this scheduler is being run for tests.
-