org.apache.synapse.commons.executors
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 Summary
 InternalQueue<E> getNextQueue()
          Should return a queue based on some selection criteria and current state of the queues.
 void init(List<InternalQueue<E>> queues)
          Initialized with the queues sorted according to the priority.
 

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


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.