eneter.messaging.nodes.loadbalancer
Class RoundRobinBalancerFactory

java.lang.Object
  extended by eneter.messaging.nodes.loadbalancer.RoundRobinBalancerFactory
All Implemented Interfaces:
ILoadBalancerFactory

public class RoundRobinBalancerFactory
extends java.lang.Object
implements ILoadBalancerFactory

Implements factory to create the load balancer based on Round-Robin algorithm. The Round-Robin balancer distributes the incoming requests equally to all maintained receivers. It means, the balancer maintains which receiver was used the last time. Then, when a new request comes, the balancer picks the next receiver in the list up. If it is at the end, then it starts from the beginning.


Constructor Summary
RoundRobinBalancerFactory(IMessagingSystemFactory duplexOutputChannelsFactory)
          Constructs the factory.
 
Method Summary
 ILoadBalancer createLoadBalancer()
          Creates the load balancer using the Round-Robin algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRobinBalancerFactory

public RoundRobinBalancerFactory(IMessagingSystemFactory duplexOutputChannelsFactory)
Constructs the factory.

Parameters:
duplexOutputChannelsFactory - messaging system used to create duplex output channels that will be used for the communication with services from the farm.
Method Detail

createLoadBalancer

public ILoadBalancer createLoadBalancer()
Creates the load balancer using the Round-Robin algorithm.

Specified by:
createLoadBalancer in interface ILoadBalancerFactory
Returns:
load balancer