|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.pastry.direct.BasicNetworkSimulator
DESCRIBE THE CLASS
| Field Summary | |
protected Logger |
logger
DESCRIBE THE FIELD |
protected SelectorManager |
manager
DESCRIBE THE FIELD |
protected int |
MIN_DELAY
DESCRIBE THE FIELD |
protected RandomSource |
random
DESCRIBE THE FIELD |
protected java.util.TreeSet |
taskQueue
DESCRIBE THE FIELD |
| Constructor Summary | |
BasicNetworkSimulator(Environment env)
Constructor for BasicNetworkSimulator. |
|
| Method Summary | |
ScheduledMessage |
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 |
CancellableTask |
enqueueDelivery(Delivery d)
DESCRIBE THE METHOD |
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 BasicNetworkSimulator 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 |
void |
start()
DESCRIBE THE METHOD |
void |
stop()
DESCRIBE THE METHOD |
| 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.TreeSet taskQueue
protected Logger logger
protected RandomSource random
protected int MIN_DELAY
protected SelectorManager manager
| Constructor Detail |
public BasicNetworkSimulator(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 TestRecordpublic void start()
start in interface NetworkSimulatorpublic void stop()
stop in interface NetworkSimulatorpublic CancellableTask enqueueDelivery(Delivery d)
enqueueDelivery in interface NetworkSimulatord - DESCRIBE THE PARAMETER
public ScheduledMessage 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 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 | ||||||||||