Rice Pastry API

rice.pastry.testing
Class PastryRegrTest

java.lang.Object
  extended by rice.pastry.testing.PastryRegrTest
Direct Known Subclasses:
DirectPastryRegrTest, DistPastryRegrTest

public abstract class PastryRegrTest
extends java.lang.Object

PastryRegrTest a regression test suite for pastry. abstract class.

Version:
$Id: PastryRegrTest.java 4654 2009-01-08 16:33:07Z jeffh $
Author:
andrew ladd, peter druschel

Field Summary
protected  Environment environment
           
protected  PastryNodeFactory factory
           
 boolean inConcJoin
           
 Id.Distance lastDist
           
 Message lastMsg
           
 Id lastNode
           
 java.util.Vector pastryNodes
           
 java.util.Vector pastryNodesLastAdded
           
 java.util.SortedMap pastryNodesSorted
          of Id
 java.util.SortedMap pastryNodesSortedReady
           
 
Constructor Summary
protected PastryRegrTest(Environment env)
          constructor
 
Method Summary
protected  void checkRoutingTable(RegrTestApp rta)
          verify the correctness of the routing table
protected  PastryNode generateNode(NodeHandle bootstrap)
           
protected abstract  NodeHandle getBootstrap(boolean firstNode)
          get a node handle to bootstrap from.
protected abstract  boolean isReallyAlive(NodeHandle nh)
          determine whether this node is really alive.
protected abstract  void killNode(PastryNode pn)
          kill a given node.
protected static void mainfunc(PastryRegrTest pt, java.lang.String[] args, int n, int d, int k, int m, int numConcJoins)
          main
abstract  void pause(int ms)
           
protected abstract  void registerapp(PastryNode pn, RegrTestApp app)
          wire protocol specific handling of the application object e.g., RMI may launch a new thread
 void sendPings(int k)
          Send messages among random message pairs.
protected abstract  boolean simulate()
          send one simulated message, or return false for a real wire protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected PastryNodeFactory factory

pastryNodes

public java.util.Vector pastryNodes

pastryNodesSorted

public java.util.SortedMap pastryNodesSorted
of Id


pastryNodesSortedReady

public java.util.SortedMap pastryNodesSortedReady

pastryNodesLastAdded

public java.util.Vector pastryNodesLastAdded

inConcJoin

public boolean inConcJoin

lastMsg

public Message lastMsg

lastDist

public Id.Distance lastDist

lastNode

public Id lastNode

environment

protected Environment environment
Constructor Detail

PastryRegrTest

protected PastryRegrTest(Environment env)
constructor

Method Detail

getBootstrap

protected abstract NodeHandle getBootstrap(boolean firstNode)
get a node handle to bootstrap from.


registerapp

protected abstract void registerapp(PastryNode pn,
                                    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(NodeHandle nh)
determine whether this node is really alive.


killNode

protected abstract void killNode(PastryNode pn)
kill a given node.


generateNode

protected PastryNode generateNode(NodeHandle bootstrap)

pause

public abstract void pause(int ms)

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 Id of an existing node)

Parameters:
k - the number of rounds

checkRoutingTable

protected void checkRoutingTable(RegrTestApp rta)
verify the correctness of the routing table


mainfunc

protected static void mainfunc(PastryRegrTest pt,
                               java.lang.String[] args,
                               int n,
                               int d,
                               int k,
                               int m,
                               int numConcJoins)
main


Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection