org.jboss.ha.client.loadbalance.aop
Class FirstAvailableIdenticalAllProxies

java.lang.Object
  extended by org.jboss.ha.client.loadbalance.FirstAvailableIdenticalAllProxies
      extended by org.jboss.ha.client.loadbalance.aop.FirstAvailableIdenticalAllProxies
All Implemented Interfaces:
Serializable, AopLoadBalancePolicy, LoadBalancePolicy

public class FirstAvailableIdenticalAllProxies
extends FirstAvailableIdenticalAllProxies
implements AopLoadBalancePolicy

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:
Brian Stansberry
See Also:
FamilyClusterInfo.getObject(), Serialized Form

Constructor Summary
FirstAvailableIdenticalAllProxies()
           
 
Method Summary
 Object chooseTarget(FamilyClusterInfo clusterFamily, org.jboss.aop.joinpoint.Invocation invocation)
          Called when the stub wishes to know on which node the next invocation must be performed.
 
Methods inherited from class org.jboss.ha.client.loadbalance.FirstAvailableIdenticalAllProxies
chooseTarget, electTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ha.client.loadbalance.LoadBalancePolicy
chooseTarget
 

Constructor Detail

FirstAvailableIdenticalAllProxies

public FirstAvailableIdenticalAllProxies()
Method Detail

chooseTarget

public Object chooseTarget(FamilyClusterInfo clusterFamily,
                           org.jboss.aop.joinpoint.Invocation invocation)
Description copied from interface: AopLoadBalancePolicy
Called when the stub wishes to know on which node the next invocation must be performed.

Specified by:
chooseTarget in interface AopLoadBalancePolicy
Parameters:
clusterFamily - A list of potential target nodes
invocation - 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.