Class JobQueue<J extends JobEntry>

    • Constructor Detail

      • JobQueue

        public JobQueue()
        Creates a new instance.
    • Method Detail

      • getNext

        public J getNext()
        Return the next job off the top of the queue, or null if there are no jobs in the queue.
        Returns:
        The next job in the queue.
      • getJob

        public J getJob​(J je)
        Return a specific job.
        Parameters:
        je - The JobEntry we are looking for.
        Returns:
        A JobEntry.
      • list

        public Vector<Jlist()
        List jobs in the queue. This is used by the scheduler UI.
        Returns:
        A Vector of JobEntry objects.
      • add

        public void add​(J je)
        Add a job to the queue.
        Parameters:
        je - A JobEntry job.
      • batchLoad

        public void batchLoad​(List<J> jobEntries)
        Batch load jobs. Retains any already enqueued jobs. Called on SchedulerService start-up.
        Parameters:
        jobEntries - A list of the JobEntry objects to load.
      • remove

        public void remove​(J je)
        Remove a job from the queue.
        Parameters:
        je - A JobEntry with the job to remove.
      • modify

        public void modify​(J je)
                    throws TurbineException
        Modify a job on the queue.
        Parameters:
        je - A JobEntry with the job to modify
        Throws:
        TurbineException - if the runtime calculation fails