Class JobStateTimeoutQueue

java.lang.Object
io.deephaven.enterprise.comm.sched.JobStateTimeoutQueue
All Implemented Interfaces:
Cloneable

public class JobStateTimeoutQueue extends Object implements Cloneable
A priority queue (heap) for JobState instances, ordered by their deadlines. Note that this class is package-private. Created by IntelliJ IDEA. User: jrauser Date: May 14, 2007 Time: 5:37:31 PM To change this template use File | Settings | File Templates.
  • Constructor Details

    • JobStateTimeoutQueue

      public JobStateTimeoutQueue(com.fishlib.io.logger.Logger log, int initialSize)
  • Method Details

    • clone

      public Object clone() throws CloneNotSupportedException
      clone the queue (for testing)
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • size

      public int size()
      return the priority queue's size
    • isEmpty

      public boolean isEmpty()
      Returns true if the priority queue contains no elements.
    • enter

      public void enter(JobState state, long deadline)
      Adds a job to to the timeout queue
    • top

      public JobState top()
      Return the top of the timeout queue - the next timeout
    • removeTop

      public void removeTop()
      Remove the top element from the timeout queue.
    • remove

      public void remove(JobState state)
      remove an arbitrary element from the timeout queue
    • testInvariant

      public boolean testInvariant(String what)
    • junitGetAllJobs

      public void junitGetAllJobs(Set<Job> jobs)