Rice Pastry API

rice.pastry.testing
Class PastryRegrTest

java.lang.Object
  |
  +--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,v 1.56 2003/07/24 11:54:03 amislove Exp $
Author:
andrew ladd, peter druschel

Field Summary
protected  rice.pastry.PastryNodeFactory factory
           
 boolean inConcJoin
           
 Id.Distance lastDist
           
 rice.pastry.messaging.Message lastMsg
           
 rice.pastry.NodeId lastNode
           
 java.util.Vector pastryNodes
           
 java.util.Vector pastryNodesLastAdded
           
 java.util.SortedMap pastryNodesSorted
           
 
Constructor Summary
protected PastryRegrTest()
          constructor
 
Method Summary
protected  rice.pastry.PastryNode generateNode(rice.pastry.NodeHandle bootstrap)
           
protected abstract  rice.pastry.NodeHandle getBootstrap(boolean firstNode)
          get a node handle to bootstrap from.
protected abstract  boolean isReallyAlive(rice.pastry.NodeId id)
          determine whether this node is really alive.
protected abstract  void killNode(rice.pastry.PastryNode pn)
          kill a given node.
protected static void mainfunc(rice.pastry.testing.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(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
 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 rice.pastry.PastryNodeFactory factory

pastryNodes

public java.util.Vector pastryNodes

pastryNodesSorted

public java.util.SortedMap pastryNodesSorted

pastryNodesLastAdded

public java.util.Vector pastryNodesLastAdded

inConcJoin

public boolean inConcJoin

lastMsg

public rice.pastry.messaging.Message lastMsg

lastDist

public Id.Distance lastDist

lastNode

public rice.pastry.NodeId lastNode
Constructor Detail

PastryRegrTest

protected PastryRegrTest()
constructor

Method Detail

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.


generateNode

protected rice.pastry.PastryNode generateNode(rice.pastry.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 nodeId of an existing node)

Parameters:
k - the number of rounds

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


Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection