rice.tutorial.deterministicsimulator
Class DirectTutorial
java.lang.Object
rice.tutorial.deterministicsimulator.DirectTutorial
public class DirectTutorial
- extends java.lang.Object
This tutorial shows how to setup a FreePastry node using the Socket Protocol.
- Author:
- Jeff Hoye
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectTutorial
public DirectTutorial(int numNodes,
Environment env)
throws java.lang.Exception
- This constructor launches numNodes PastryNodes. They will bootstrap
to an existing ring if one exists at the specified location, otherwise
it will start a new ring.
- Parameters:
bindport
- the local port to bind tobootaddress
- the IP:port of the node to boot fromnumNodes
- the number of nodes to create in this JVMenv
- the environment for these nodes
- Throws:
java.lang.Exception
scheduleBootTask
public void scheduleBootTask(int numNodes,
NodeIdFactory nidFactory,
PastryNodeFactory factory,
Environment env)
scheduleDeliveryTask
public void scheduleDeliveryTask(NodeIdFactory nidFactory,
Environment env)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Usage:
java [-cp FreePastry-.jar] rice.tutorial.direct.DirectTutorial numNodes randSeed
example java rice.tutorial.direct.DirectTutorial 100 5
- Throws:
java.lang.Exception
Copyright © 2001-2005 - Rice Pastry.