Interface Scheduler

All Superinterfaces:
io.deephaven.base.clock.Clock
All Known Implementing Classes:
Scheduler.DelegatingImpl

public interface Scheduler extends io.deephaven.base.clock.Clock
The Scheduler is used to schedule tasks that should execute at a future time.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
     
    void
    runAfterDelay(long delayMs, @NotNull Runnable command)
    Schedule this task to run at the specified time.
    void
    runAtTime(long epochMillis, @NotNull Runnable command)
    Schedule this task to run at the specified time.
    void
    runImmediately(@NotNull Runnable command)
    Schedule this task to run immediately.
    void
    runSerially(@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

      void runAtTime(long epochMillis, @NotNull @NotNull Runnable command)
      Schedule this task to run at the specified time.
      Parameters:
      epochMillis - when to run this task
      command - the task to run
    • runAfterDelay

      void runAfterDelay(long delayMs, @NotNull @NotNull Runnable command)
      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

      void runImmediately(@NotNull @NotNull Runnable command)
      Schedule this task to run immediately.
      Parameters:
      command - the task to run
    • runSerially

      void runSerially(@NotNull @NotNull Runnable command)
      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.