Rice Pastry API

rice.pastry.testing
Class DistPastryRegrTest

java.lang.Object
  |
  +--rice.pastry.testing.PastryRegrTest
        |
        +--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,v 1.14 2003/07/21 19:45:47 druschel Exp $
Author:
Alan Mislove

Field Summary
 
Fields inherited from class rice.pastry.testing.PastryRegrTest
factory, inConcJoin, lastDist, lastMsg, lastNode, pastryNodes, pastryNodesLastAdded, pastryNodesSorted
 
Constructor Summary
DistPastryRegrTest()
           
 
Method Summary
protected  rice.pastry.NodeHandle getBootstrap(boolean firstNode)
          Gets a handle to a bootstrap node.
 boolean isReallyAlive(rice.pastry.NodeId id)
          determine whether this node is really alive.
protected  void killNode(rice.pastry.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(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
 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()
Method Detail

getBootstrap

protected rice.pastry.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(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

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(rice.pastry.NodeId id)
Description copied from class: PastryRegrTest
determine whether this node is really alive.

Specified by:
isReallyAlive in class PastryRegrTest

killNode

protected void killNode(rice.pastry.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)
Usage: DistRegrPastryTest [-port p] [-protocol (wire|rmi)] [-nodes n] [-bootstrap host[:port]] [-help]


Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection