org.jboss.ha.framework.interfaces
Interface LoadBalancePolicy

All Superinterfaces:
org.jboss.ha.client.loadbalance.LoadBalancePolicy, Serializable

public interface LoadBalancePolicy
extends org.jboss.ha.client.loadbalance.LoadBalancePolicy

Extends the parent interface by adding support for passing in a legacy (i.e. non-AOP) Invocation as an aid in making the choice of targets.

Version:
$Revision: 81001 $
Author:
Bill Burke., Sacha Labourey.

Field Summary
static long serialVersionUID
          The serialVersionUID
 
Method Summary
 Object chooseTarget(org.jboss.ha.framework.interfaces.FamilyClusterInfo clusterFamily, 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 interface org.jboss.ha.client.loadbalance.LoadBalancePolicy
chooseTarget
 

Field Detail

serialVersionUID

static final long serialVersionUID
The serialVersionUID

Since:
1.3.4.2
See Also:
Constant Field Values
Method Detail

init

void init(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

Parameters:
father - The stub that owns the policy

chooseTarget

Object chooseTarget(org.jboss.ha.framework.interfaces.FamilyClusterInfo clusterFamily,
                    Invocation routingDecision)
Called when the stub wishes to know on which node the next invocation must be performed.

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


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.