|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.testing.DistHelloWorldMultiThread
A hello world example for pastry. This is the distributed driver. For example, run with default arguments on two machines, both with args -bootstrap firstmachine. Read the messages and follow the protocols. Either separately or with the above, try -nodes 3 and -nodes 20. Try -msgs 100. Try the two machine configuration, kill it, restart, and watch it join as a different node. Do that a few times, watch LeafSet entries accumulate, then in 30 seconds, watch the maintenance take over.
Field Summary | |
static int |
protocol
|
java.util.Random |
rng
|
Constructor Summary | |
DistHelloWorldMultiThread()
Constructor |
Method Summary | |
boolean |
allNodesCreated()
|
protected NodeHandle |
getBootstrap(boolean firstNode)
Gets a handle to a bootstrap node. |
void |
killPastryNode()
Create a Pastry node and add it to pastryNodes. |
static void |
main(java.lang.String[] args)
Usage: DistHelloWorld [-msgs m] [-nodes n] [-port p] [-bootstrap bshost[:bsport]] [-verbose|-silent|-verbosity v] [-help]. |
PastryNode |
makePastryNode(boolean firstNode)
Create a Pastry node and add it to pastryNodes. |
void |
MessageRecieved(HelloMsg helloMsg)
|
void |
MessageSent(HelloMsg helloMsg)
|
void |
node_created()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Random rng
public static int protocol
Constructor Detail |
public DistHelloWorldMultiThread()
Method Detail |
protected NodeHandle getBootstrap(boolean firstNode)
firstNode
- true of the first virtual node is being bootstrapped on this host
public PastryNode makePastryNode(boolean firstNode)
public static void main(java.lang.String[] args)
public void MessageSent(HelloMsg helloMsg)
public void MessageRecieved(HelloMsg helloMsg)
public boolean allNodesCreated()
public void node_created()
public void killPastryNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |