Interface NextQueueAlgorithm<E>

  • Type Parameters:
    E -
    All Known Implementing Classes:
    PRRNextQueueAlgorithm

    public interface NextQueueAlgorithm<E>
    This interface abstracts the algorithm for determining the next internal queue for picking up the message. This class is created once and initialized. This class should capture any runtime information about the queues since the MultiPriorityBlockingQueue doesn't hold any runtime state information about the queues.
    • Method Detail

      • init

        void init​(List<InternalQueue<E>> queues)
        Initialized with the queues sorted according to the priority.
        Parameters:
        queues - list of queues
      • getNextQueue

        InternalQueue<E> getNextQueue()
        Should return a queue based on some selection criteria and current state of the queues.
        Returns:
        the queue