rice.pastry.testing
Class PastryRegrTest
- public abstract class PastryRegrTest
- PastryRegrTest a regression test suite for pastry. abstract class.
- Version:
- $Id: PastryRegrTest.java,v 1.38 2002/09/14 16:03:54 druschel Exp $
- Author:
- andrew ladd
- peter druschel
PastryRegrTest
protected PastryRegrTest()
- constructor
getBootstrap
protected abstract rice.pastry.NodeHandle getBootstrap(boolean firstNode)
- get a node handle to bootstrap from.
registerapp
protected abstract void registerapp(rice.pastry.PastryNode pn,
rice.pastry.testing.RegrTestApp app)
- wire protocol specific handling of the application object e.g., RMI may launch a new thread
- Parameters:
pn
- pastry node
app
- newly created application
simulate
protected abstract boolean simulate()
- send one simulated message, or return false for a real wire protocol.
isReallyAlive
protected abstract boolean isReallyAlive(rice.pastry.NodeId id)
- determine whether this node is really alive.
killNode
protected abstract void killNode(rice.pastry.PastryNode pn)
- kill a given node.
makePastryNode
private void makePastryNode()
- make a new pastry node
makePastryNode
private void makePastryNode(int num)
- make a set of num new pastry nodes, concurrently this tests concurrent node joins
- Parameters:
num
- the number of nodes in a set
sendPings
public void sendPings(int k)
- Send messages among random message pairs. In each round, one message is sent from a random source node to a random destination; then, a second message is sent from a random source node with a random key (key is not necessaily the nodeId of an existing node)
- Parameters:
k
- the number of rounds
checkLeafSet
private void checkLeafSet(rice.pastry.testing.RegrTestApp rta)
- verify the correctness of the leaf set
checkRoutingTable
private void checkRoutingTable(rice.pastry.testing.RegrTestApp rta)
- verify the correctness of the routing table
initiateLeafSetMaintenance
private void initiateLeafSetMaintenance()
- initiate leafset maintenance
initiateRouteSetMaintenance
private void initiateRouteSetMaintenance()
- initiate routing table maintenance
killNodes
private void killNodes(int num)
- kill a given number of nodes, randomly chosen
- Parameters:
num
- the number of nodes to kill
mainfunc
protected static void mainfunc(rice.pastry.testing.PastryRegrTest pt,
java.lang.String[] args,
int n,
int d,
int k,
int m,
int numConcJoins)
- main