|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.standard.StandardLeafSetProtocol
public class StandardLeafSetProtocol
An implementation of a simple leaf set protocol.
Field Summary | |
---|---|
protected boolean |
failstop
|
protected LeafSet |
leafSet
|
protected NodeHandle |
localHandle
|
protected PastryNode |
localNode
|
protected Logger |
logger
|
protected RoutingTable |
routeTable
|
protected PastrySecurityManager |
security
|
Constructor Summary | |
---|---|
StandardLeafSetProtocol(PastryNode ln,
NodeHandle local,
PastrySecurityManager sm,
LeafSet ls,
RoutingTable rt)
|
Method Summary | |
---|---|
protected void |
broadcast()
Broadcast the leaf set to all members of the local leaf set. |
protected void |
broadcast(int type)
Broadcast the leaf set to all members of the local leaf set. |
protected void |
broadcast(LeafSet ls,
NodeHandle from)
Broadcast the local leaf set to all members of the given leaf set, plus the node from which the leaf set was received. |
protected boolean |
checkLeafSet(LeafSet remotels,
NodeHandle from,
boolean notifyMissing)
Checks a received leafset advertisement for missing nodes |
Address |
getAddress()
Gets the address. |
void |
maintainLeafSet()
Maintain the leaf set. |
protected boolean |
mergeLeafSet(LeafSet remotels,
NodeHandle from)
Merge a remote leafset into our own |
void |
receiveMessage(Message msg)
Receives messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final boolean failstop
protected NodeHandle localHandle
protected PastryNode localNode
protected PastrySecurityManager security
protected LeafSet leafSet
protected RoutingTable routeTable
protected Logger logger
Constructor Detail |
---|
public StandardLeafSetProtocol(PastryNode ln, NodeHandle local, PastrySecurityManager sm, LeafSet ls, RoutingTable rt)
Method Detail |
---|
public Address getAddress()
public void receiveMessage(Message msg)
receiveMessage
in interface MessageReceiver
msg
- the message.protected boolean checkLeafSet(LeafSet remotels, NodeHandle from, boolean notifyMissing)
remotels
- the remote leafsetfrom
- the node from which we received the leafsetnotifyMissing
- if true, notify missing nodes
protected boolean mergeLeafSet(LeafSet remotels, NodeHandle from)
remotels
- the remote leafsetfrom
- the node from which we received the leafset
protected void broadcast()
protected void broadcast(int type)
type
- the type of broadcast message usedprotected void broadcast(LeafSet ls, NodeHandle from)
ls
- the leafset whose members we send to local leaf setfrom
- the node from which ls was receivedpublic void maintainLeafSet()
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |