FileDocCategorySizeDatePackage
LoadBalancePolicy.javaAPI DocJBoss 4.2.12776Fri Jul 13 20:52:36 BST 2007org.jboss.ha.framework.interfaces

LoadBalancePolicy

public interface LoadBalancePolicy implements Serializable
Base interface for load-balancing policies. It is possible to implement many different load-balancing policies by implementing this simple interface and using it in the different clustered services (home interface of SLSB for example)
author
Bill Burke.
author
Sacha Labourey.
version
$Revision: 57188 $

Fields Summary
static final long
serialVersionUID
The serialVersionUID
Constructors Summary
Methods Summary
public java.lang.ObjectchooseTarget(FamilyClusterInfo clusterFamily)
Called when the stub wishes to know on which node the next invocation must be performed.

param
clusterFamily A list of potential target nodes
return
The selected target for the next invocation

public java.lang.ObjectchooseTarget(FamilyClusterInfo clusterFamily, org.jboss.invocation.Invocation routingDecision)
Called when the stub wishes to know on which node the next invocation must be performed.

param
clusterFamily A list of potential target nodes
param
routingDecision The actual invocation object if the policy wants to have some kind of invocation-based routing strategy
return
The selected target for the next invocation

public voidinit(HARMIClient father)
Initialize the policy with a reference to its parent stub. the load-balancing policy implementation can use HARMIClient data to take its decision

param
father The stub that owns the policy