|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpeersim.transport.E2ENetwork
public class E2ENetwork
This static singleton emulates an underlying router network of fixed size, and stores the latency measurements for all pairs of routers.
| Method Summary | |
|---|---|
static int |
getLatency(int sender,
int receiver)
Returns the latency associated to the specified (sender, receiver) pair. |
static int |
getSize()
Returns the current size of the underlying network (i.e., the number of routers). |
static void |
reset(int size,
boolean symm)
Resets the network, by creating a triangular (if symm is true) or a rectangular (if symm is false) array of integers. |
static void |
setLatency(int sender,
int receiver,
int latency)
Sets the latency associated to the specified (sender, receiver) pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void reset(int size,
boolean symm)
size - the number or routerssymm - if latency is symmetric between all pairs of routers
public static int getLatency(int sender,
int receiver)
sender - the index of the senderreceiver - the index of the receiver
public static void setLatency(int sender,
int receiver,
int latency)
sender - the index of the senderreceiver - the index of the receiverlatency - the latency to be setpublic static int getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||