|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.nodemap.policy.AbstractNodePolicy
public abstract class AbstractNodePolicy
Abstract node policy class. This class manages the list of nodes that are available for assignment. Subclasses must implement the logic for making the assignments.
NodeAssignPolicy.chooseNode(long),
NodeAssignPolicy.chooseNode(long, com.sun.sgs.auth.Identity)| Field Summary | |
|---|---|
protected List<Long> |
availableNodes
The list of available nodes. |
| Fields inherited from interface com.sun.sgs.impl.service.nodemap.NodeAssignPolicy |
|---|
SERVER_NODE |
| Constructor Summary | |
|---|---|
protected |
AbstractNodePolicy()
Creates a new instance of the AbstractNodePolicy. |
| Method Summary | |
|---|---|
long |
chooseNode(long requestingNode,
Identity id)
Choose a node to assign an identity to. |
void |
nodeAvailable(long nodeId)
Inform the policy that a node is now available. |
void |
nodeUnavailable(long nodeId)
Inform the policy that a node is no longer available. |
void |
reset()
Reset the policy, informing it that no nodes are available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.sgs.impl.service.nodemap.NodeAssignPolicy |
|---|
chooseNode |
| Field Detail |
|---|
protected final List<Long> availableNodes
| Constructor Detail |
|---|
protected AbstractNodePolicy()
| Method Detail |
|---|
public long chooseNode(long requestingNode,
Identity id)
throws NoNodesAvailableException
NodeAssignPolicy.chooseNode(long), ignoring
the id parameter.
chooseNode in interface NodeAssignPolicyrequestingNode - the id of the node making the request, or
SERVER_NODE if the system is making the requestid - the identity which needs an assignment.
NoNodesAvailableException - if there are no live nodes to assign topublic void nodeAvailable(long nodeId)
nodeAvailable in interface NodeAssignPolicynodeId - the node IDpublic void nodeUnavailable(long nodeId)
nodeUnavailable in interface NodeAssignPolicynodeId - the node IDpublic void reset()
reset in interface NodeAssignPolicy
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||