|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.standard.StandardLeafSetProtocol
An implementation of a simple leaf set protocol.
Constructor Summary | |
StandardLeafSetProtocol(rice.pastry.PastryNode ln,
rice.pastry.NodeHandle local,
rice.pastry.security.PastrySecurityManager sm,
rice.pastry.leafset.LeafSet ls,
rice.pastry.routing.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(rice.pastry.leafset.LeafSet ls,
rice.pastry.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(rice.pastry.leafset.LeafSet remotels,
rice.pastry.NodeHandle from,
boolean notifyMissing)
Checks a received leafset advertisement for missing nodes |
rice.pastry.messaging.Address |
getAddress()
Gets the address. |
void |
maintainLeafSet()
Maintain the leaf set. |
protected boolean |
mergeLeafSet(rice.pastry.leafset.LeafSet remotels,
rice.pastry.NodeHandle from)
Merge a remote leafset into our own |
void |
receiveMessage(rice.pastry.messaging.Message msg)
Receives messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardLeafSetProtocol(rice.pastry.PastryNode ln, rice.pastry.NodeHandle local, rice.pastry.security.PastrySecurityManager sm, rice.pastry.leafset.LeafSet ls, rice.pastry.routing.RoutingTable rt)
Method Detail |
public rice.pastry.messaging.Address getAddress()
public void receiveMessage(rice.pastry.messaging.Message msg)
receiveMessage
in interface MessageReceiver
msg
- the message.protected boolean checkLeafSet(rice.pastry.leafset.LeafSet remotels, rice.pastry.NodeHandle from, boolean notifyMissing)
remotels
- the remote leafsetfrom
- the node from which we received the leafsetnotifyMissing
- if true, notify missing nodes
protected boolean mergeLeafSet(rice.pastry.leafset.LeafSet remotels, rice.pastry.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(rice.pastry.leafset.LeafSet ls, rice.pastry.NodeHandle from)
ls
- the leafset whose members we send to local leaf setfrom
- the node from which ls was receivedpublic void maintainLeafSet()
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |