public class RoundRobinLoadBalancingStrategy extends Object implements LoadBalancingStrategy
LoadBalancingStrategy
. This
implementation will keep track of the index of the handler that has been
tried first and use a different starting handler every dispatch.Constructor and Description |
---|
RoundRobinLoadBalancingStrategy() |
Modifier and Type | Method and Description |
---|---|
Iterator<MessageHandler> |
getHandlerIterator(Message<?> message,
Collection<MessageHandler> handlers)
Returns an iterator that starts at a new point in the collection every time the
first part of the list that is skipped will be used at the end of the
iteration, so it guarantees all handlers are returned once on subsequent
next() invocations. |
public final Iterator<MessageHandler> getHandlerIterator(Message<?> message, Collection<MessageHandler> handlers)
next()
invocations.getHandlerIterator
in interface LoadBalancingStrategy