Class LazyPriorityJobQueue

  • All Implemented Interfaces:
    Iterable<Job>, Collection<Job>, BlockingQueue<Job>, Queue<Job>
    Direct Known Subclasses:
    LazyScheduler

    public class LazyPriorityJobQueue
    extends AbstractPriorityJobQueue
    This class provides and implementation of scheduler with a priority sensitive queue and polls from iterator when queue is empty.

    Jobs in queue will be processed first in order of higher priority, followed by requests in the iterator.

    Author:
    Maksim Tkachenko, Ween Jiann Lee
    • Constructor Detail

      • LazyPriorityJobQueue

        public LazyPriorityJobQueue​(Iterator<Request> requests,
                                    Handler handler)
        Constructs an instance of lazy scheduler with a default handler.
        Parameters:
        requests - An iterator to obtain requests
        handler - The default handler to use
      • LazyPriorityJobQueue

        public LazyPriorityJobQueue​(Iterator<Request> requests)
        Constructs an instance of lazy scheduler without a default handler.
        Parameters:
        requests - An iterator to obtain requests