Class Scheduler.Null

java.lang.Object
io.deephaven.io.sched.Scheduler.Null
All Implemented Interfaces:
Scheduler
Enclosing interface:
Scheduler

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

    • Null

      public Null()
  • Method Details

    • currentTimeMillis

      public long currentTimeMillis()
      Description copied from interface: Scheduler
      Return the scheduler's idea of the current time.
      Specified by:
      currentTimeMillis in interface Scheduler
    • installJob

      public void installJob(Job job, long deadline, SelectableChannel channel, int interest)
      Description copied from interface: Scheduler
      Install a job in association with a channel and an interest set.
      Specified by:
      installJob in interface Scheduler
    • installJob

      public void installJob(Job job, long deadline)
      Description copied from interface: Scheduler
      Install a job with only an associated deadline (removing any channel association)
      Specified by:
      installJob in interface Scheduler
    • cancelJob

      public void cancelJob(Job job)
      Description copied from interface: Scheduler
      Cancel a job, making the scheduler forget it completely..
      Specified by:
      cancelJob in interface Scheduler
    • work

      public boolean work(long timeout, Runnable handoff)
      Description copied from interface: Scheduler
      Wait for jobs to become ready, then invoke() them all. This method will form the core of the main loop of a scheduler-driven application. The method first waits until: -- the given timeout expires, -- the earliest job-specific timeout expires, or -- one or more jobs becomes ready If jobs have become ready, then the entire ready set will be invoked. If any job throws an uncaught exception, the job's terminated() method will be called and the job deregistered. This does not abort the invocation of the remaining jobs. The return value is then the number of jobs that were invoked. If no jobs are ready and any job-specific timeouts expire, the associated jobs' timedOut() methods are called. The return value is the negative of the number of expired timeouts. If the time given by the timeout argument expires, then zero is returned. Note that this method is not synchronized. The application must ensure that it is never called concurrently by more than one thread.
      Specified by:
      work in interface Scheduler
      Returns:
      true, if some job was dispatched
    • close

      public void close()
      Description copied from interface: Scheduler
      Shut down the scheduler, calling close() on the underlying Selector.
      Specified by:
      close in interface Scheduler
    • isClosed

      public boolean isClosed()
      Description copied from interface: Scheduler
      Return true if the scheduler is closing or closed.
      Specified by:
      isClosed in interface Scheduler
    • junitGetSelector

      public Selector junitGetSelector()
      Description copied from interface: Scheduler
      Return a reference to the selector
      Specified by:
      junitGetSelector in interface Scheduler
    • junitGetAllJobs

      public Set<Job> junitGetAllJobs()
      Description copied from interface: Scheduler
      Return all jobs known to the scheduler, in whatever state.
      Specified by:
      junitGetAllJobs in interface Scheduler
    • junitGetTimeoutQueue

      public ArrayList<Job> junitGetTimeoutQueue()
      Description copied from interface: Scheduler
      Return the contents of the timeout queue, in deadline order
      Specified by:
      junitGetTimeoutQueue in interface Scheduler
      Returns:
      the jobs in the timeout queue
    • junitGetAllKeys

      public ArrayList<SelectionKey> junitGetAllKeys()
      Description copied from interface: Scheduler
      Return the selection keys currently known to the scheduler.
      Specified by:
      junitGetAllKeys in interface Scheduler
    • junitGetReadyKeys

      public ArrayList<SelectionKey> junitGetReadyKeys()
      Description copied from interface: Scheduler
      Return the selection keys currently known to the scheduler.
      Specified by:
      junitGetReadyKeys in interface Scheduler
    • junitGetChannelsAndJobs

      public Map<SelectableChannel,Job> junitGetChannelsAndJobs()
      Description copied from interface: Scheduler
      Return a map containing all channels and the jobs to which they are associated.
      Specified by:
      junitGetChannelsAndJobs in interface Scheduler
    • junitTestTimeoutQueueInvariant

      public boolean junitTestTimeoutQueueInvariant()
      Description copied from interface: Scheduler
      Return true if the timeout queue invariant holds.
      Specified by:
      junitTestTimeoutQueueInvariant in interface Scheduler