org.springframework.integration.dispatcher
Class RoundRobinLoadBalancingStrategy
java.lang.Object
org.springframework.integration.dispatcher.RoundRobinLoadBalancingStrategy
- All Implemented Interfaces:
- LoadBalancingStrategy
public class RoundRobinLoadBalancingStrategy
- extends Object
- implements LoadBalancingStrategy
Round-robin implementation of 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.
- Since:
- 1.0.3
- Author:
- Iwein Fuld, Mark Fisher
Method Summary |
Iterator<MessageHandler> |
getHandlerIterator(Message<?> message,
List<MessageHandler> handlers)
Returns an iterator that starts at a new point in the list 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinLoadBalancingStrategy
public RoundRobinLoadBalancingStrategy()
getHandlerIterator
public final Iterator<MessageHandler> getHandlerIterator(Message<?> message,
List<MessageHandler> handlers)
- Returns an iterator that starts at a new point in the list 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.
- Specified by:
getHandlerIterator
in interface LoadBalancingStrategy
Copyright © 2010. All Rights Reserved.