|
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.multiring.MultiRingAppl
Class which represents a pastry node which is in multiple rings. It internally contains a pastry node for each seperate ring, and has logic for routing messages between the nodes. Note that the pastry nodes in all of the different rings have the same NodeId.
| Field Summary | |
static int |
REMINDER_TIMEOUT
|
| Fields inherited from class rice.pastry.client.PastryAppl |
address, instance, thePastryNode |
| Constructor Summary | |
protected |
MultiRingAppl(rice.pastry.multiring.MultiRingPastryNode node)
Constructor |
| Method Summary | |
void |
addRing(rice.pastry.multiring.RingId ringId)
|
boolean |
anycastHandler(rice.scribe.messaging.ScribeMessage msg)
Invoked by underlying scribe when it receives a anycast Message, to check if there is a local application which can take care of this anycast message. |
void |
faultHandler(rice.scribe.messaging.ScribeMessage msg,
rice.pastry.NodeHandle faultyParent)
Invoked by Scribe just before the "repair" SUBSCRIBE message is sent when a node suspects its parent is faulty. |
void |
forwardHandler(rice.scribe.messaging.ScribeMessage msg)
Called by Scribe before the node forwards a message to its children in the multicast tree. |
rice.pastry.messaging.Address |
getAddress()
Returns the address of this application. |
rice.pastry.security.Credentials |
getCredentials()
Returns the credentials of this application. |
rice.pastry.multiring.RingId |
getRingId()
|
protected rice.scribe.Scribe |
getScribe()
|
void |
isNewRoot(rice.pastry.NodeId topicId)
Upcall made by scribe to registered applications to inform them that local node is now the root for some topic, and hence can take appropriate action. |
void |
messageForAppl(rice.pastry.messaging.Message msg)
Called by pastry when a message arrives for this application. |
void |
newParent(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle newParent,
java.io.Serializable data)
Upcall made by scribe to the registered applications to inform them that a new parent is found for local node in the topic tree. |
void |
receiveMessage(rice.scribe.messaging.ScribeMessage msg)
Called by Scribe when a multicast message arrives. |
protected void |
routeMultiRingMessage(rice.pastry.routing.RouteMessage rm)
|
protected void |
routeMultiRingMessage(rice.pastry.routing.RouteMessage rm,
rice.pastry.multiring.RingId ringId)
|
void |
scribeIsReady()
Invoked when the underlying Scribe substrate is ready. |
void |
subscribeHandler(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle child,
boolean wasAdded,
java.io.Serializable obj)
Invoked by Scribe after a child is added to or removed from one of the node's children tables. |
| Methods inherited from class rice.pastry.client.PastryAppl |
enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, registerReceiver, routeMsg, routeMsgDirect, routeSetChange, sendMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int REMINDER_TIMEOUT
| Constructor Detail |
protected MultiRingAppl(rice.pastry.multiring.MultiRingPastryNode node)
| Method Detail |
public void addRing(rice.pastry.multiring.RingId ringId)
protected rice.scribe.Scribe getScribe()
public rice.pastry.multiring.RingId getRingId()
public void messageForAppl(rice.pastry.messaging.Message msg)
PastryAppl
messageForAppl in class PastryApplmsg - the message that is arriving.protected void routeMultiRingMessage(rice.pastry.routing.RouteMessage rm)
protected void routeMultiRingMessage(rice.pastry.routing.RouteMessage rm,
rice.pastry.multiring.RingId ringId)
public boolean anycastHandler(rice.scribe.messaging.ScribeMessage msg)
IScribeApp
anycastHandler in interface IScribeAppmsg - The corresponding Anycast message
public rice.pastry.messaging.Address getAddress()
PastryAppl
getAddress in class PastryApplpublic rice.pastry.security.Credentials getCredentials()
PastryAppl
getCredentials in class PastryApplpublic void isNewRoot(rice.pastry.NodeId topicId)
IScribeApp
isNewRoot in interface IScribeApptopicId - The topic for which local node is the
new root.
public void newParent(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle newParent,
java.io.Serializable data)
IScribeApp
newParent in interface IScribeApptopicId - The topic for which new parent is foundnewParent - The new parentdata - The data received with the ACK message.public void scribeIsReady()
IScribeApp
scribeIsReady in interface IScribeApppublic void receiveMessage(rice.scribe.messaging.ScribeMessage msg)
IScribeApp
receiveMessage in interface IScribeAppmsg - The message sent in the PUBLISH message.public void forwardHandler(rice.scribe.messaging.ScribeMessage msg)
IScribeApp
forwardHandler in interface IScribeAppmsg - The message about to be forwarded.
public void subscribeHandler(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle child,
boolean wasAdded,
java.io.Serializable obj)
IScribeApp
subscribeHandler in interface IScribeApptopicId - The topic for which child was added or removed.child - The corresponding child.wasAdded - true if child was added and false if child was removed.obj - The additional data associated with the subscription message, SUBSCRIBE
msg, sent by the "original" child, not the forwarding node.
public void faultHandler(rice.scribe.messaging.ScribeMessage msg,
rice.pastry.NodeHandle faultyParent)
IScribeApp
faultHandler in interface IScribeAppmsg - The SUBSCRIBE message that is sent to repair the multicast tree.faultyParent - The suspected faulty parent.
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||