jrunx.cluster
Class RoundRobinAlgorithm

java.lang.Object
  |
  +--jrunx.cluster.ClusterAlgorithm
        |
        +--jrunx.cluster.RoundRobinAlgorithm
All Implemented Interfaces:
ClusterConstants, java.io.Serializable
Direct Known Subclasses:
StickyRoundRobinAlgorithm

public class RoundRobinAlgorithm
extends ClusterAlgorithm

This algorithm selects the first ClusterableService in a list of such services, and selects the next service in the list for each subsequent invocation.

Author:
PS Neville
See Also:
Serialized Form

Field Summary
protected  int cursor
           
 
Fields inherited from class jrunx.cluster.ClusterAlgorithm
rand
 
Fields inherited from interface jrunx.cluster.ClusterConstants
AVAILABLE_SERVICES, CLUSTER_MANAGER_JNDI, DEFAULT_CLUSTER_DOMAIN, DEFAULT_ENABLED, JINI_CODE_BASE_JAR, PRIMARY_SERVICE, SECONDARY_SERVICE
 
Constructor Summary
RoundRobinAlgorithm()
           
 
Method Summary
 ClusterableService selectService(java.util.ArrayList services)
           
 
Methods inherited from class jrunx.cluster.ClusterAlgorithm
chooseRandom, chooseRandom, chooseStub, getPrefered, invokeService, invokeService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cursor

protected int cursor
Constructor Detail

RoundRobinAlgorithm

public RoundRobinAlgorithm()
Method Detail

selectService

public ClusterableService selectService(java.util.ArrayList services)
                                 throws java.rmi.RemoteException
Overrides:
selectService in class ClusterAlgorithm


Copyright � 2002 Macromedia Corporation. All Rights Reserved.