|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.framework.interfaces.RandomRobin
LoadBalancingPolicy implementation that always fully randomly select its target (without basing its decision on any historic).
LoadBalancePolicy
(src) ,
Serialized FormField 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 | |
java.lang.Object |
chooseTarget(FamilyClusterInfo (src) clusterFamily)
Called when the stub wishes to know on which node the next invocation must be performed. |
java.lang.Object |
chooseTarget(FamilyClusterInfo (src) clusterFamily,
Invocation (src) routingDecision)
Called when the stub wishes to know on which node the next invocation must be performed. |
void |
init(HARMIClient (src) 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 java.util.Random localRandomizer
Constructor Detail |
public RandomRobin()
Method Detail |
public void init(HARMIClient (src) father)
LoadBalancePolicy (src)
init
in interface LoadBalancePolicy (src)
father
- The stub that owns the policypublic java.lang.Object chooseTarget(FamilyClusterInfo (src) clusterFamily)
LoadBalancePolicy (src)
chooseTarget
in interface LoadBalancePolicy (src)
clusterFamily
- A list of potential target nodes
public java.lang.Object chooseTarget(FamilyClusterInfo (src) clusterFamily, Invocation (src) routingDecision)
LoadBalancePolicy (src)
chooseTarget
in interface LoadBalancePolicy (src)
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 (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |