|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.transport.UniformRandomTransport
public final class UniformRandomTransport
Implement a transport layer that reliably delivers messages with a random delay, that is drawn from the configured interval according to the uniform distribution.
Parameter Summary | |
---|---|
mindelay
String name of the parameter used to configure the minimum latency. |
|
maxdelay
String name of the parameter used to configure the maximum latency. |
Constructor Summary | |
---|---|
UniformRandomTransport(java.lang.String prefix)
Reads configuration parameter. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns this . |
long |
getLatency(Node src,
Node dest)
Returns a random delay, that is drawn from the configured interval according to the uniform distribution. |
void |
send(Node src,
Node dest,
java.lang.Object msg,
int pid)
Delivers the message with a random delay, that is drawn from the configured interval according to the uniform distribution. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parameter Detail |
---|
mindelay
maxdelay
Constructor Detail |
---|
public UniformRandomTransport(java.lang.String prefix)
Method Detail |
---|
public java.lang.Object clone()
this
. This way only one instance exists in the system
that is linked from all the nodes. This is because this protocol has no
node specific state.
clone
in interface Protocol
clone
in class java.lang.Object
public void send(Node src, Node dest, java.lang.Object msg, int pid)
send
in interface Transport
src
- sender nodedest
- destination nodemsg
- message to be sentpid
- protocol identifierpublic long getLatency(Node src, Node dest)
getLatency
in interface Transport
src
- sender nodedest
- destination node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |