org.jboss.soa.esb.listeners.ha
Class RandomRobin

java.lang.Object
  extended by org.jboss.soa.esb.listeners.ha.AbstractLoadBalancePolicy
      extended by org.jboss.soa.esb.listeners.ha.RandomRobin
All Implemented Interfaces:
LoadBalancePolicy

public class RandomRobin
extends AbstractLoadBalancePolicy

LoadBalancingPolicy implementation that always fully randomly select its epr (without basing its decision on any historic). Code based on jbossas ha framework.

Author:
Kurt Stam.

Field Summary
static java.util.Random localRandomizer
          This needs to be a class variable or else you end up with multiple Random numbers with the same seed when many clients lookup a proxy.
 
Constructor Summary
RandomRobin()
           
 
Method Summary
protected  EPR chooseEPRByPolicy(ServiceClusterInfo serviceCluster)
           
 
Methods inherited from class org.jboss.soa.esb.listeners.ha.AbstractLoadBalancePolicy
chooseEPR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localRandomizer

public static final java.util.Random localRandomizer
This needs to be a class variable or else you end up with multiple Random numbers with the same seed when many clients lookup a proxy.

Constructor Detail

RandomRobin

public RandomRobin()
Method Detail

chooseEPRByPolicy

protected EPR chooseEPRByPolicy(ServiceClusterInfo serviceCluster)
Specified by:
chooseEPRByPolicy in class AbstractLoadBalancePolicy