Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 2896 2006-01-09 17:11:50Z jeffh $
Author:
  andrew ladd, peter druschel

Field Summary
`protected Environment` | `environment` DESCRIBE THE FIELD
`protected PastryNodeFactory` | `factory` DESCRIBE THE FIELD
`boolean` | `inConcJoin` DESCRIBE THE FIELD
`Id.Distance` | `lastDist` DESCRIBE THE FIELD
`Message` | `lastMsg` DESCRIBE THE FIELD
`NodeId` | `lastNode` DESCRIBE THE FIELD
`java.util.Vector` | `pastryNodes` DESCRIBE THE FIELD
`java.util.Vector` | `pastryNodesLastAdded` DESCRIBE THE FIELD
`java.util.SortedMap` | `pastryNodesSorted` of NodeId

Constructor Summary
`protected` | `PastryRegrTest(Environment env)` constructor

Method Summary
`protected PastryNode` | `generateNode(NodeHandle bootstrap)` DESCRIBE THE METHOD
`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)` DESCRIBE THE METHOD
`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

  DESCRIBE THE FIELD

### pastryNodes

    public java.util.Vector pastryNodes

  DESCRIBE THE FIELD

### pastryNodesSorted

    public java.util.SortedMap pastryNodesSorted

  of NodeId

### pastryNodesLastAdded

    public java.util.Vector pastryNodesLastAdded

  DESCRIBE THE FIELD

### inConcJoin

    public boolean inConcJoin

  DESCRIBE THE FIELD

### lastMsg

    public Message lastMsg

  DESCRIBE THE FIELD

### lastDist

    public Id.Distance lastDist

  DESCRIBE THE FIELD

### lastNode

    public NodeId lastNode

  DESCRIBE THE FIELD

### environment

    protected Environment environment

  DESCRIBE THE FIELD

Constructor Detail

### PastryRegrTest

    protected PastryRegrTest(Environment env)

  constructor

Parameters:
  `env` - DESCRIBE THE PARAMETER

Method Detail

### getBootstrap

    protected abstract NodeHandle getBootstrap(boolean firstNode)

  get a node handle to bootstrap from.

  Parameters:
    `firstNode` - DESCRIBE THE PARAMETER
  Returns:
    The Bootstrap value

### isReallyAlive

    protected abstract boolean isReallyAlive(NodeHandle nh)

  determine whether this node is really alive.

  Parameters:
    `nh` - DESCRIBE THE PARAMETER
  Returns:
    The ReallyAlive value

### 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.

  Returns:
    DESCRIBE THE RETURN VALUE

### killNode

    protected abstract void killNode(PastryNode pn)

  kill a given node.

  Parameters:
    `pn` - DESCRIBE THE PARAMETER

### generateNode

    protected PastryNode generateNode(NodeHandle bootstrap)

  DESCRIBE THE METHOD

  Parameters:
    `bootstrap` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE

### pause

    public abstract void pause(int ms)

  DESCRIBE THE METHOD

  Parameters:
    `ms` - DESCRIBE THE PARAMETER

### 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(PastryRegrTest pt,
                                   java.lang.String[] args,
                                   int n,
                                   int d,
                                   int k,
                                   int m,
                                   int numConcJoins)

  main

  Parameters:
    `pt` - DESCRIBE THE PARAMETER
    `args` - DESCRIBE THE PARAMETER
    `n` - DESCRIBE THE PARAMETER
    `d` - DESCRIBE THE PARAMETER
    `k` - DESCRIBE THE PARAMETER
    `m` - DESCRIBE THE PARAMETER
    `numConcJoins` - DESCRIBE THE PARAMETER

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.