|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ha.framework.interfaces.RandomRobin
LoadBalancingPolicy implementation that always fully randomly select its target (without basing its decision on any historic).
LoadBalancePolicy
,
Serialized FormField Summary | |
static 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 | |
Object |
chooseTarget(FamilyClusterInfo clusterFamily)
Called when the stub wishes to know on which node the next invocation must be performed. |
Object |
chooseTarget(FamilyClusterInfo clusterFamily,
org.jboss.invocation.Invocation routingDecision)
Called when the stub wishes to know on which node the next invocation must be performed. |
void |
init(HARMIClient father)
Initialize the policy with a reference to its parent stub. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Random localRandomizer
Constructor Detail |
public RandomRobin()
Method Detail |
public void init(HARMIClient father)
LoadBalancePolicy
init
in interface LoadBalancePolicy
father
- The stub that owns the policypublic Object chooseTarget(FamilyClusterInfo clusterFamily)
LoadBalancePolicy
chooseTarget
in interface LoadBalancePolicy
clusterFamily
- A list of potential target nodes
public Object chooseTarget(FamilyClusterInfo clusterFamily, org.jboss.invocation.Invocation routingDecision)
LoadBalancePolicy
chooseTarget
in interface LoadBalancePolicy
clusterFamily
- A list of potential target nodesroutingDecision
- The actual invocation object if the policy wants
to have some kind of invocation-based routing strategy
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |