|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.pastry.direct.GeometricNetworkSimulator
DESCRIBE THE CLASS
| Field Summary | |
protected Logger |
logger
DESCRIBE THE FIELD |
protected java.util.Vector |
msgQueue
DESCRIBE THE FIELD |
protected RandomSource |
random
DESCRIBE THE FIELD |
protected java.util.TreeSet |
taskQueue
DESCRIBE THE FIELD |
| Constructor Summary | |
GeometricNetworkSimulator(Environment env)
Constructor for GeometricNetworkSimulator. |
|
| Method Summary | |
void |
deliverMessage(Message msg,
DirectPastryNode node)
DESCRIBE THE METHOD |
ScheduledMessage |
deliverMessage(Message msg,
DirectPastryNode node,
int delay)
DESCRIBE THE METHOD |
ScheduledMessage |
deliverMessage(Message msg,
DirectPastryNode node,
int delay,
int period)
DESCRIBE THE METHOD |
ScheduledMessage |
deliverMessageFixedRate(Message msg,
DirectPastryNode node,
int delay,
int period)
DESCRIBE THE METHOD |
void |
destroy(DirectPastryNode node)
set the liveliness of a NodeId |
DirectNodeHandle |
getClosest(DirectNodeHandle nh)
find the closest NodeId to an input NodeId out of all NodeIds in the network |
Environment |
getEnvironment()
Gets the Environment attribute of the GeometricNetworkSimulator object |
TestRecord |
getTestRecord()
get TestRecord |
boolean |
isAlive(DirectNodeHandle nh)
testing if a NodeId is alive |
int |
proximity(DirectNodeHandle a,
DirectNodeHandle b)
computes the proximity between two NodeIds |
void |
registerNode(DirectPastryNode dpn)
DESCRIBE THE METHOD |
void |
removeNode(DirectPastryNode node)
DESCRIBE THE METHOD |
void |
setTestRecord(TestRecord tr)
set TestRecord |
boolean |
simulate()
DESCRIBE THE METHOD |
protected boolean |
simulate(long maxTime)
Delivers 1 message. |
boolean |
simulateFor(int millis)
DESCRIBE THE METHOD |
boolean |
simulateUntil(long targetTime)
1) process the msgQueue 2) see if there is a) no scheduled messages between now and then |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface rice.pastry.direct.NetworkSimulator |
generateNodeRecord |
| Field Detail |
protected java.util.Vector msgQueue
protected java.util.TreeSet taskQueue
protected Logger logger
protected RandomSource random
| Constructor Detail |
public GeometricNetworkSimulator(Environment env)
env - DESCRIBE THE PARAMETER| Method Detail |
public TestRecord getTestRecord()
getTestRecord in interface NetworkSimulatorpublic boolean isAlive(DirectNodeHandle nh)
isAlive in interface NetworkSimulatornh - DESCRIBE THE PARAMETER
public DirectNodeHandle getClosest(DirectNodeHandle nh)
getClosest in interface NetworkSimulatornh - DESCRIBE THE PARAMETER
public Environment getEnvironment()
getEnvironment in interface NetworkSimulatorpublic void setTestRecord(TestRecord tr)
setTestRecord in interface NetworkSimulatortr - input TestRecord
public void deliverMessage(Message msg,
DirectPastryNode node)
deliverMessage in interface NetworkSimulatormsg - DESCRIBE THE PARAMETERnode - DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessage(Message msg,
DirectPastryNode node,
int delay)
deliverMessage in interface NetworkSimulatormsg - DESCRIBE THE PARAMETERnode - DESCRIBE THE PARAMETERdelay - DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessage(Message msg,
DirectPastryNode node,
int delay,
int period)
deliverMessage in interface NetworkSimulatormsg - DESCRIBE THE PARAMETERnode - DESCRIBE THE PARAMETERdelay - DESCRIBE THE PARAMETERperiod - DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessageFixedRate(Message msg,
DirectPastryNode node,
int delay,
int period)
deliverMessageFixedRate in interface NetworkSimulatormsg - DESCRIBE THE PARAMETERnode - DESCRIBE THE PARAMETERdelay - DESCRIBE THE PARAMETERperiod - DESCRIBE THE PARAMETER
public boolean simulate()
simulate in interface NetworkSimulatorprotected boolean simulate(long maxTime)
maxTime - DESCRIBE THE PARAMETER
public boolean simulateFor(int millis)
simulateFor in interface NetworkSimulatormillis - DESCRIBE THE PARAMETER
public boolean simulateUntil(long targetTime)
simulateUntil in interface NetworkSimulatortargetTime - DESCRIBE THE PARAMETER
public void destroy(DirectPastryNode node)
destroy in interface NetworkSimulatornode - DESCRIBE THE PARAMETER
public int proximity(DirectNodeHandle a,
DirectNodeHandle b)
proximity in interface NetworkSimulatora - the first NodeIdb - the second NodeId
public void registerNode(DirectPastryNode dpn)
registerNode in interface NetworkSimulatordpn - DESCRIBE THE PARAMETERpublic void removeNode(DirectPastryNode node)
removeNode in interface NetworkSimulatornode - DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||