Rice Pastry API

rice.pastry.testing
Class RegrTestApp

java.lang.Object
  extended by rice.pastry.client.PastryAppl
      extended by rice.pastry.client.CommonAPIAppl
          extended by rice.pastry.testing.RegrTestApp

public class RegrTestApp
extends CommonAPIAppl

RegrTestApp A regression test suite for pastry. This is the per-node app object.

Version:
$Id: RegrTestApp.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
andrew ladd, peter druschel

Field Summary
 
Fields inherited from class rice.pastry.client.PastryAppl
address, deserializer, instance, logger, receiver, thePastryNode
 
Constructor Summary
RegrTestApp(PastryNode pn, PastryRegrTest prg)
           
 
Method Summary
 void deliver(Id key, Message msg)
          Makes sure the message was delivered to the correct node by crossrefrencing the sorted nodes list in the simulator.
 void forward(RouteMessage rm)
          Called by pastry when a message is enroute and is passing through this node.
 int getAddress()
          Returns the address of this application.
 PastryNode getPastryNode()
           
 void notifyReady()
          Invoked when the Pastry node has joined the overlay network and is ready to send and receive messages
 void routeSetChange(NodeHandle nh, boolean wasAdded)
          Called by pastry when the route set changes.
 void sendMsg(Id nid)
           
 void sendTrace(Id nid)
           
 void update(NodeHandle nh, boolean wasAdded)
          Called by pastry when the neighbor set changes.
 
Methods inherited from class rice.pastry.client.CommonAPIAppl
leafSetChange, localLookup, messageForAppl, neighborSet, range, range, receiveMessage, replicaSet, route
 
Methods inherited from class rice.pastry.client.PastryAppl
accept, connect, deliverWhenNotReady, destroy, enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, receiveMessageInternal, receiveSocket, register, routeMsg, routeMsgDirect, setDeserializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegrTestApp

public RegrTestApp(PastryNode pn,
                   PastryRegrTest prg)
Method Detail

getAddress

public int getAddress()
Description copied from class: PastryAppl
Returns the address of this application.

Overrides:
getAddress in class PastryAppl
Returns:
the address.

sendMsg

public void sendMsg(Id nid)

sendTrace

public void sendTrace(Id nid)

deliver

public void deliver(Id key,
                    Message msg)
Makes sure the message was delivered to the correct node by crossrefrencing the sorted nodes list in the simulator.

Specified by:
deliver in class CommonAPIAppl
msg - the message that is arriving.

forward

public void forward(RouteMessage rm)
Description copied from class: CommonAPIAppl
Called by pastry when a message is enroute and is passing through this node. If this method is not overridden, the default behaviour is to let the message pass through.

Overrides:
forward in class CommonAPIAppl
Parameters:
rm - the message that is passing through.

update

public void update(NodeHandle nh,
                   boolean wasAdded)
Description copied from class: CommonAPIAppl
Called by pastry when the neighbor set changes.

Overrides:
update in class CommonAPIAppl
Parameters:
nh - the handle of the node that was added or removed.

routeSetChange

public void routeSetChange(NodeHandle nh,
                           boolean wasAdded)
Description copied from class: PastryAppl
Called by pastry when the route set changes.

Overrides:
routeSetChange in class PastryAppl
Parameters:
nh - the handle of the node that was added or removed.
wasAdded - true if the node was added, false if the node was removed.

notifyReady

public void notifyReady()
Invoked when the Pastry node has joined the overlay network and is ready to send and receive messages

Overrides:
notifyReady in class CommonAPIAppl

getPastryNode

public PastryNode getPastryNode()

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection