com.sun.sgs.impl.service.nodemap.policy
Class RoundRobinPolicy
java.lang.Object
com.sun.sgs.impl.service.nodemap.policy.AbstractNodePolicy
com.sun.sgs.impl.service.nodemap.policy.RoundRobinPolicy
- All Implemented Interfaces:
- NodeAssignPolicy
- Direct Known Subclasses:
- LocalNodePolicy
public class RoundRobinPolicy
- extends AbstractNodePolicy
A very simple round robin assignment policy.
|
Method Summary |
long |
chooseNode(long requestingNode)
Choose a node to assign an identity, or set of identities to. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinPolicy
public RoundRobinPolicy(Properties props)
- Creates a new instance of RoundRobinPolicy.
- Parameters:
props - service properties
chooseNode
public long chooseNode(long requestingNode)
throws NoNodesAvailableException
- Choose a node to assign an identity, or set of identities to.
- Parameters:
requestingNode - the id of the node making the request, or
SERVER_NODE if the system is making the request
- Returns:
- the chosen node's id
- Throws:
NoNodesAvailableException - if there are no live nodes to assign to
Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved