|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.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 PARAMETERMethod Detail |
public TestRecord getTestRecord()
getTestRecord
in interface NetworkSimulator
public boolean isAlive(DirectNodeHandle nh)
isAlive
in interface NetworkSimulator
nh
- DESCRIBE THE PARAMETER
public DirectNodeHandle getClosest(DirectNodeHandle nh)
getClosest
in interface NetworkSimulator
nh
- DESCRIBE THE PARAMETER
public Environment getEnvironment()
getEnvironment
in interface NetworkSimulator
public void setTestRecord(TestRecord tr)
setTestRecord
in interface NetworkSimulator
tr
- input TestRecordpublic void start()
start
in interface NetworkSimulator
public void stop()
stop
in interface NetworkSimulator
public CancellableTask enqueueDelivery(Delivery d)
enqueueDelivery
in interface NetworkSimulator
d
- DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessage(Message msg, DirectPastryNode node)
deliverMessage
in interface NetworkSimulator
msg
- DESCRIBE THE PARAMETERnode
- DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessage(Message msg, DirectPastryNode node, int delay)
deliverMessage
in interface NetworkSimulator
msg
- DESCRIBE THE PARAMETERnode
- DESCRIBE THE PARAMETERdelay
- DESCRIBE THE PARAMETER
public ScheduledMessage deliverMessage(Message msg, DirectPastryNode node, int delay, int period)
deliverMessage
in interface NetworkSimulator
msg
- 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 NetworkSimulator
msg
- DESCRIBE THE PARAMETERnode
- DESCRIBE THE PARAMETERdelay
- DESCRIBE THE PARAMETERperiod
- DESCRIBE THE PARAMETER
public void destroy(DirectPastryNode node)
destroy
in interface NetworkSimulator
node
- DESCRIBE THE PARAMETERpublic int proximity(DirectNodeHandle a, DirectNodeHandle b)
proximity
in interface NetworkSimulator
a
- the first NodeIdb
- the second NodeId
public void registerNode(DirectPastryNode dpn)
registerNode
in interface NetworkSimulator
dpn
- DESCRIBE THE PARAMETERpublic void removeNode(DirectPastryNode node)
removeNode
in interface NetworkSimulator
node
- DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |