Rice Pastry API

rice.pastry.standard
Class RapidRerouter

java.lang.Object
  extended by rice.pastry.client.PastryAppl
      extended by rice.pastry.standard.StandardRouter
          extended by rice.pastry.standard.RapidRerouter
All Implemented Interfaces:
LivenessListener<NodeHandle>, Router

public class RapidRerouter
extends StandardRouter
implements LivenessListener<NodeHandle>

The superclass makes the routing decisions. This class handles the rapid-rerouting.

Author:
Jeff Hoye

Field Summary
static int MAX_RETRIES
          The max times to try to reroute a message.
 
Fields inherited from class rice.pastry.standard.StandardRouter
lastTimeSentRouteTablePatch, ROUTE_TABLE_PATCH_THROTTLE
 
Fields inherited from class rice.pastry.client.PastryAppl
address, deserializer, instance, logger, options, receiver, thePastryNode
 
Fields inherited from interface org.mpisws.p2p.transport.liveness.LivenessListener
LIVENESS_ALIVE, LIVENESS_DEAD, LIVENESS_DEAD_FOREVER, LIVENESS_SUSPECTED
 
Constructor Summary
RapidRerouter(PastryNode thePastryNode, MessageDispatch dispatch)
           
 
Method Summary
 void destroy()
          Called when PastryNode is destroyed.
 void livenessChanged(NodeHandle i, int val, java.util.Map<java.lang.String,java.lang.Integer> options)
          Called when the liveness changes.
protected  void rerouteMe(RouteMessage rm, NodeHandle oldDest, java.lang.Exception ioe)
           
protected  void sendTheMessage(RouteMessage rm, NodeHandle handle)
           
 
Methods inherited from class rice.pastry.standard.StandardRouter
deliverToApplication, deliverWhenNotReady, messageForAppl, receiveMessage, route, routeMessage
 
Methods inherited from class rice.pastry.client.PastryAppl
accept, canReceiveSocket, connect, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessageInternal, register, routeMsg, routeMsgDirect, routeSetChange, setDeserializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_RETRIES

public static final int MAX_RETRIES
The max times to try to reroute a message.

See Also:
Constant Field Values
Constructor Detail

RapidRerouter

public RapidRerouter(PastryNode thePastryNode,
                     MessageDispatch dispatch)
Method Detail

sendTheMessage

protected void sendTheMessage(RouteMessage rm,
                              NodeHandle handle)
Overrides:
sendTheMessage in class StandardRouter

rerouteMe

protected void rerouteMe(RouteMessage rm,
                         NodeHandle oldDest,
                         java.lang.Exception ioe)

livenessChanged

public void livenessChanged(NodeHandle i,
                            int val,
                            java.util.Map<java.lang.String,java.lang.Integer> options)
Description copied from interface: LivenessListener
Called when the liveness changes.

Specified by:
livenessChanged in interface LivenessListener<NodeHandle>

destroy

public void destroy()
Description copied from class: PastryAppl
Called when PastryNode is destroyed. Can be overloaded by applications.

Overrides:
destroy in class PastryAppl

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection