|
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.StandardRouter
public class StandardRouter
An implementation of the standard Pastry routing algorithm.
Field Summary | |
---|---|
protected java.util.Map<NodeHandle,java.lang.Long> |
lastTimeSentRouteTablePatch
We can end up causing a nasty feeback if we blast too many BRRs, so we're going to throttle. |
protected int |
ROUTE_TABLE_PATCH_THROTTLE
|
Fields inherited from class rice.pastry.client.PastryAppl |
---|
address, deserializer, instance, logger, options, receiver, thePastryNode |
Constructor Summary | |
---|---|
StandardRouter(PastryNode thePastryNode,
MessageDispatch dispatch)
Constructor. |
Method Summary | |
---|---|
void |
deliverToApplication(RouteMessage msg)
|
boolean |
deliverWhenNotReady()
Instructs the MessageDispatch how to behave when the PastryNode is not ready. |
void |
messageForAppl(Message msg)
Called by pastry when a message arrives for this application. |
void |
receiveMessage(Message msg)
Receive a message from a remote node. |
void |
route(RouteMessage rm)
|
boolean |
routeMessage(RouteMessage rm)
Routes the messages if the next hop has been set up. |
protected void |
sendTheMessage(RouteMessage rm,
NodeHandle handle)
|
Methods inherited from class rice.pastry.client.PastryAppl |
---|
accept, canReceiveSocket, connect, destroy, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, 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 int ROUTE_TABLE_PATCH_THROTTLE
protected java.util.Map<NodeHandle,java.lang.Long> lastTimeSentRouteTablePatch
Constructor Detail |
---|
public StandardRouter(PastryNode thePastryNode, MessageDispatch dispatch)
rt
- the routing table.ls
- the leaf set.Method Detail |
---|
public void receiveMessage(Message msg)
receiveMessage
in class PastryAppl
msg
- the message.public void route(RouteMessage rm)
route
in interface Router
public boolean routeMessage(RouteMessage rm)
localId
- the node id of the local node.
protected void sendTheMessage(RouteMessage rm, NodeHandle handle)
public void deliverToApplication(RouteMessage msg)
public boolean deliverWhenNotReady()
PastryAppl
deliverWhenNotReady
in class PastryAppl
public void messageForAppl(Message msg)
PastryAppl
messageForAppl
in class PastryAppl
msg
- the message that is arriving.
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |