org.jboss.ha.client.loadbalance
Class FirstAvailableIdenticalAllProxies

java.lang.Object
  extended by org.jboss.ha.client.loadbalance.FirstAvailableIdenticalAllProxies
All Implemented Interfaces:
Serializable, LoadBalancePolicy
Direct Known Subclasses:
FirstAvailableIdenticalAllProxies

public class FirstAvailableIdenticalAllProxies
extends Object
implements LoadBalancePolicy

Extends the "sticky session" behavior of FirstAvailable by caching the favored target in the FamilyClusterInfo, thus allowing different proxies for the same family to use the same favored target.

See FirstAvailable for the basic behavior.

Version:
$Revision: 57642 $
Author:
Sacha Labourey., brian.stansberry@jboss.com
See Also:
LoadBalancePolicy, FamilyClusterInfo.getObject(), Serialized Form

Constructor Summary
FirstAvailableIdenticalAllProxies()
           
 
Method Summary
 Object chooseTarget(FamilyClusterInfo clusterFamily)
          Gets the target for the next remote call.
protected  Object electTarget(List targets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstAvailableIdenticalAllProxies

public FirstAvailableIdenticalAllProxies()
Method Detail

chooseTarget

public Object chooseTarget(FamilyClusterInfo clusterFamily)
Description copied from interface: LoadBalancePolicy
Gets the target for the next remote call.

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

Specified by:
chooseTarget in interface LoadBalancePolicy
Parameters:
clusterFamily - object encapsulating a list of potential target nodes
Returns:
The selected target for the next invocation

electTarget

protected Object electTarget(List targets)


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