|
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
public abstract class BasicNetworkSimulator
DESCRIBE THE CLASS
| Field Summary | |
|---|---|
protected Logger |
logger
DESCRIBE THE FIELD |
protected SelectorManager |
manager
DESCRIBE THE FIELD |
protected int |
maxDiameter
DESCRIBE THE FIELD |
protected int |
MIN_DELAY
DESCRIBE THE FIELD |
protected int |
minDelay
DESCRIBE THE FIELD |
protected RandomSource |
random
DESCRIBE THE FIELD |
| Constructor Summary | |
|---|---|
BasicNetworkSimulator(Environment env)
Constructor for BasicNetworkSimulator. |
|
| Method Summary | |
|---|---|
ScheduledMessage |
deliverMessage(Message msg,
DirectPastryNode node)
node should always be a local node, because this will be delivered instantly |
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,
int delay)
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 |
float |
networkDelay(DirectNodeHandle a,
DirectNodeHandle b)
computes the proximity between two NodeIds |
float |
proximity(DirectNodeHandle a,
DirectNodeHandle b)
DESCRIBE THE METHOD |
void |
registerNode(DirectPastryNode dpn)
DESCRIBE THE METHOD |
void |
removeNode(DirectPastryNode node)
DESCRIBE THE METHOD |
void |
setFullSpeed()
Sets the FullSpeed attribute of the BasicNetworkSimulator object |
void |
setMaxSpeed(float speed)
Sets the MaxSpeed attribute of the BasicNetworkSimulator object |
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 Logger logger
protected RandomSource random
protected int MIN_DELAY
protected SelectorManager manager
protected final int maxDiameter
protected final int minDelay
| 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 setMaxSpeed(float speed)
setMaxSpeed in interface NetworkSimulatorspeed - The new MaxSpeed valuepublic void setFullSpeed()
setFullSpeed in interface NetworkSimulatorpublic void start()
start in interface NetworkSimulatorpublic void stop()
stop in interface NetworkSimulator
public CancellableTask enqueueDelivery(Delivery d,
int delay)
enqueueDelivery in interface NetworkSimulatord - DESCRIBE THE PARAMETERdelay - 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 float networkDelay(DirectNodeHandle a,
DirectNodeHandle b)
networkDelay in interface NetworkSimulatora - the first NodeIdb - the second NodeId
public float proximity(DirectNodeHandle a,
DirectNodeHandle b)
proximity in interface NetworkSimulatora - DESCRIBE THE PARAMETERb - DESCRIBE THE PARAMETER
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 | |||||||||