Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ha.framework.interfaces
Interface LoadBalancePolicy

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  FirstAvailable, FirstAvailableIdenticalAllProxies, RandomRobin, RoundRobin

public interface LoadBalancePolicy
extends 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)

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

Field Summary
`static long` | `serialVersionUID` The serialVersionUID

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.

Field Detail

### serialVersionUID

    public static final long serialVersionUID

  The serialVersionUID

  Since:
    1.3.4.2
  See Also:
    Constant Field Values

Method Detail

### init

    public 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

    public Object chooseTarget(FamilyClusterInfo clusterFamily)

  Called when the stub wishes to know on which node the next invocation must be performed.

  Parameters:
    `clusterFamily` - A list of potential target nodes
  Returns:
    The selected target for the next invocation

### chooseTarget

    public 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.

  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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.