|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.client.PastryAppl rice.pastry.standard.StandardLeafSetProtocol
public class StandardLeafSetProtocol
An implementation of a simple leaf set protocol.
Field Summary | |
---|---|
protected boolean |
failstop
|
protected LeafSet |
leafSet
|
protected Logger |
logger
|
protected RoutingTable |
routeTable
|
Fields inherited from class rice.pastry.client.PastryAppl |
---|
address, deserializer, instance, options, receiver, thePastryNode |
Constructor Summary | |
---|---|
StandardLeafSetProtocol(PastryNode ln,
NodeHandle local,
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 |
boolean |
deliverWhenNotReady()
Instructs the MessageDispatch how to behave when the PastryNode is not ready. |
void |
leafSetChange(NodeHandle nh,
boolean wasAdded)
We manage the leafset now. |
void |
maintainLeafSet()
Maintain the leaf set. |
protected boolean |
mergeLeafSet(LeafSet remotels,
NodeHandle from)
Merge a remote leafset into our own |
void |
messageForAppl(Message msg)
Receives messages. |
void |
update(java.util.Observable o,
java.lang.Object arg)
If nodehandle is dead, remove it from the leafset. |
Methods inherited from class rice.pastry.client.PastryAppl |
---|
accept, canReceiveSocket, connect, destroy, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, notifyReady, receiveMessage, receiveMessageInternal, register, routeMsg, routeMsg, routeMsgDirect, routeSetChange, setDeserializer |
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 LeafSet leafSet
protected RoutingTable routeTable
protected Logger logger
Constructor Detail |
---|
public StandardLeafSetProtocol(PastryNode ln, NodeHandle local, LeafSet ls, RoutingTable rt)
Method Detail |
---|
public void messageForAppl(Message msg)
messageForAppl
in class PastryAppl
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()
public boolean deliverWhenNotReady()
PastryAppl
deliverWhenNotReady
in class PastryAppl
public void leafSetChange(NodeHandle nh, boolean wasAdded)
leafSetChange
in class PastryAppl
nh
- the handle of the node that was added or removed.wasAdded
- true if the node was added, false if the node was removed.public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |