com.caucho.servlets
Class LoadBalanceStrategy
java.lang.Object
com.caucho.servlets.LoadBalanceStrategy
- Direct Known Subclasses:
- LeastConnectionBalanceStrategy, RoundRobinBalanceStrategy
public abstract class LoadBalanceStrategy
- extends java.lang.Object
Strategy for selecting the next server
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_serverGroup
protected ServerConnector[] _serverGroup
LoadBalanceStrategy
public LoadBalanceStrategy()
openServer
public final ClusterStream openServer(ServerConnector oldClient)
- Opens the next available server.
- Parameters:
oldClient - on failover, the client which failed with 503
- Returns:
- the next available server
openBestServer
protected ClusterStream openBestServer(int startIndex,
ServerConnector oldClient)
- Opens the best load balance server.
- Parameters:
oldClient - on failover, the client which failed with 503
nextRoundRobin
protected int nextRoundRobin()
- Returns the index of the next round-robin server.