ePOST API

rice.pastry.testing
Class DistPastryRegrTest

java.lang.Object
  extended by rice.pastry.testing.PastryRegrTest
      extended by rice.pastry.testing.DistPastryRegrTest

public class DistPastryRegrTest
extends PastryRegrTest

a regression test suite for pastry with "distributed" nodes. All nodes are on one physical machine, but they communicate through one of the network transport protocols, i.e., RMI or WIRE. See the usage for more information, the -protocol option can be used to specify which protocol to run the test with.

Version:
$Id: DistPastryRegrTest.java 2805 2005-11-17 16:22:24Z jeffh $
Author:
Alan Mislove

Field Summary
 
Fields inherited from class rice.pastry.testing.PastryRegrTest
environment, factory, inConcJoin, lastDist, lastMsg, lastNode, pastryNodes, pastryNodesLastAdded, pastryNodesSorted, pastryNodesSortedReady
 
Constructor Summary
DistPastryRegrTest(Environment env)
           
 
Method Summary
protected  NodeHandle getBootstrap(boolean firstNode)
          Gets a handle to a bootstrap node.
 boolean isReallyAlive(NodeHandle nh)
          determine whether this node is really alive.
protected  void killNode(PastryNode pn)
          kill a given node.
static void main(java.lang.String[] args)
          Usage: DistRegrPastryTest [-port p] [-protocol (wire|rmi)] [-nodes n] [-bootstrap host[:port]] [-help]
 void pause(int ms)
           
protected  void registerapp(PastryNode pn, RegrTestApp app)
          wire protocol specific handling of the application object e.g., RMI may launch a new thread
 boolean simulate()
          send one simulated message, or return false for a real wire protocol.
 
Methods inherited from class rice.pastry.testing.PastryRegrTest
generateNode, mainfunc, sendPings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistPastryRegrTest

public DistPastryRegrTest(Environment env)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getBootstrap

protected NodeHandle getBootstrap(boolean firstNode)
Gets a handle to a bootstrap node.

Specified by:
getBootstrap in class PastryRegrTest
Parameters:
firstNode - true if bootstraping the first virtual node on this host
Returns:
handle to bootstrap node, or null.

registerapp

protected void registerapp(PastryNode pn,
                           RegrTestApp app)
wire protocol specific handling of the application object e.g., RMI may launch a new thread

Specified by:
registerapp in class PastryRegrTest
Parameters:
pn - pastry node
app - newly created application

simulate

public boolean simulate()
Description copied from class: PastryRegrTest
send one simulated message, or return false for a real wire protocol.

Specified by:
simulate in class PastryRegrTest

pause

public void pause(int ms)
Specified by:
pause in class PastryRegrTest

isReallyAlive

public boolean isReallyAlive(NodeHandle nh)
Description copied from class: PastryRegrTest
determine whether this node is really alive.

Specified by:
isReallyAlive in class PastryRegrTest

killNode

protected void killNode(PastryNode pn)
Description copied from class: PastryRegrTest
kill a given node.

Specified by:
killNode in class PastryRegrTest

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Usage: DistRegrPastryTest [-port p] [-protocol (wire|rmi)] [-nodes n] [-bootstrap host[:port]] [-help]

Throws:
java.io.IOException

ePOST API

Copyright © 2001-2005 - Rice Pastry.