Class Scheduler.DelegatingImpl

java.lang.Object
io.deephaven.server.util.Scheduler.DelegatingImpl
All Implemented Interfaces:
Clock, Scheduler
Enclosing interface:
Scheduler

public static class Scheduler.DelegatingImpl extends Object implements Scheduler
  • Constructor Details

  • Method Details

    • shutdown

      @VisibleForTesting public void shutdown() throws InterruptedException
      Throws:
      InterruptedException
    • currentTimeMillis

      public long currentTimeMillis()
      Description copied from interface: Clock
      Milliseconds since the epoch, 1970-01-01T00:00:00Z.

      The resolution is dependent on the JVM and underlying implementation.

      Specified by:
      currentTimeMillis in interface Clock
      Returns:
      epoch millis
    • currentTimeMicros

      public long currentTimeMicros()
      Description copied from interface: Clock
      Microseconds since the epoch, 1970-01-01T00:00:00Z.

      The resolution is dependent on the JVM and underlying implementation. The resolution is greater than or equal to Clock.currentTimeMillis().

      Specified by:
      currentTimeMicros in interface Clock
      Returns:
      epoch microseconds
    • currentTimeNanos

      public long currentTimeNanos()
      Description copied from interface: Clock
      Nanoseconds since the epoch, 1970-01-01T00:00:00Z.

      The resolution is dependent on the JVM and underlying implementation. The resolution is greater than or equal to Clock.currentTimeMicros() and Clock.currentTimeMillis().

      Specified by:
      currentTimeNanos in interface Clock
      Returns:
      epoch nanoseconds
    • instantNanos

      public Instant instantNanos()
      Description copied from interface: Clock
      The instant.

      Has resolution equal to Clock.currentTimeNanos().

      If you don't need the resolution provided by Clock.currentTimeNanos(), prefer Clock.instantMillis().

      Specified by:
      instantNanos in interface Clock
      Returns:
      the instant
    • instantMillis

      public Instant instantMillis()
      Description copied from interface: Clock
      The instant.

      Has resolution greater than or equal to Clock.currentTimeMillis().

      Specified by:
      instantMillis in interface Clock
      Returns:
      the instant.
    • runAtTime

      public void runAtTime(long epochMillis, @NotNull @NotNull Runnable command)
      Description copied from interface: Scheduler
      Schedule this task to run at the specified time.
      Specified by:
      runAtTime in interface Scheduler
      Parameters:
      epochMillis - when to run this task
      command - the task to run
    • runImmediately

      public void runImmediately(@NotNull @NotNull Runnable command)
      Description copied from interface: Scheduler
      Schedule this task to run immediately.
      Specified by:
      runImmediately in interface Scheduler
      Parameters:
      command - the task to run
    • runAfterDelay

      public void runAfterDelay(long delayMs, @NotNull @NotNull Runnable command)
      Description copied from interface: Scheduler
      Schedule this task to run at the specified time.
      Specified by:
      runAfterDelay in interface Scheduler
      Parameters:
      delayMs - how long to delay before running this task (in milliseconds)
      command - the task to run
    • runSerially

      public void runSerially(@NotNull @NotNull Runnable command)
      Description copied from interface: Scheduler
      Schedule this task to run immediately, under the exclusive UGP lock.
      Specified by:
      runSerially in interface Scheduler
      Parameters:
      command - the task to run