|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GenericNetworkSimulator<Identifier,MessageType>
Field Summary |
---|
Fields inherited from interface org.mpisws.p2p.transport.liveness.LivenessTypes |
---|
LIVENESS_ALIVE, LIVENESS_DEAD, LIVENESS_DEAD_FOREVER, LIVENESS_SUSPECTED |
Method Summary | |
---|---|
Cancellable |
deliverMessage(MessageType msg,
Identifier to,
Identifier from,
int delay)
Deliver message. |
CancellableTask |
enqueueDelivery(Delivery del,
int delay)
Deliver message. |
Environment |
getEnvironment()
|
Environment |
getEnvironment(Identifier i)
Get the environment related to a specific node. |
RandomSource |
getRandomSource()
|
DirectTransportLayer<Identifier,MessageType> |
getTL(Identifier i)
|
boolean |
isAlive(Identifier i)
|
float |
networkDelay(Identifier a,
Identifier b)
Determines delivery time from a to b. |
void |
remove(Identifier i)
Kill identifier. |
void |
setFullSpeed()
unlimited maxSpeed |
void |
setMaxSpeed(float rate)
The max rate of the simulator compared to realtime. |
void |
start()
|
void |
stop()
|
Methods inherited from interface org.mpisws.p2p.transport.liveness.LivenessProvider |
---|
addLivenessListener, checkLiveness, clearState, getLiveness, removeLivenessListener |
Method Detail |
---|
Environment getEnvironment()
Environment getEnvironment(Identifier i)
i
-
float networkDelay(Identifier a, Identifier b)
a
- a node id.b
- another node id.
Cancellable deliverMessage(MessageType msg, Identifier to, Identifier from, int delay)
msg
- message to deliver.node
- the Pastry node to deliver it to.how
- long to delay to deliver the messageCancellableTask enqueueDelivery(Delivery del, int delay)
msg
- message to deliver.node
- the Pastry node to deliver it to.how
- long to delay to deliver the messageperiod
- to deliver the message after the delayDirectTransportLayer<Identifier,MessageType> getTL(Identifier i)
boolean isAlive(Identifier i)
void remove(Identifier i)
i
- void start()
void stop()
void setMaxSpeed(float rate)
the
- multiple on realtime that the simulator is allowed to run at,
zero or less will cause no bound on the simulation speedvoid setFullSpeed()
RandomSource getRandomSource()
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |