|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NodeAssignPolicy
Interface for node assignment. The actual policy to be used is configurable
in the node mapping server. A class implementing the NodeAssignPolicy
interface must have a public constructor that takes the following argument:
| Field Summary | |
|---|---|
static long |
SERVER_NODE
An id representing the server node. |
| Method Summary | |
|---|---|
long |
chooseNode(long requestingNode)
Choose a node to assign an identity, or set of identities to. |
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. |
| Field Detail |
|---|
static final long SERVER_NODE
| Method Detail |
|---|
long chooseNode(long requestingNode)
throws NoNodesAvailableException
requestingNode - the id of the node making the request, or
SERVER_NODE if the system is making the request
NoNodesAvailableException - if there are no live nodes to assign to
long chooseNode(long requestingNode,
Identity id)
throws NoNodesAvailableException
requestingNode - 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 tovoid nodeAvailable(long nodeId)
nodeId - the node IDvoid nodeUnavailable(long nodeId)
nodeId - the node IDvoid reset()
|
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 | |||||||||