|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthu.mta.sztaki.lpds.cloud.simulator.io.NetworkNode
public class NetworkNode
This class represents a networked element in the system. The class also contains the definitions for the helper classes in the network simulation that together are responsible to introduce and simulate network delays in the system. The instances of this class are always present and represent the general network capabilities in the hosts.
Nested Class Summary | |
---|---|
static class |
NetworkNode.NetworkException
|
(package private) static class |
NetworkNode.SingleTransfer
The instances of this class represent an individual data transfer in the system. |
Field Summary | |
---|---|
MaxMinConsumer |
diskinbws
|
MaxMinProvider |
diskoutbws
|
MaxMinConsumer |
inbws
|
private HashMap<String,Integer> |
latencies
|
private String |
name
|
MaxMinProvider |
outbws
|
Constructor Summary | |
---|---|
NetworkNode(String id,
long maxInBW,
long maxOutBW,
long diskBW,
HashMap<String,Integer> latencymap)
This function initializes the bandwidth spreaders for the node to ensure equal network share for each transfer occurring on the node. |
Method Summary | |
---|---|
static int |
checkConnectivity(NetworkNode from,
NetworkNode to)
|
long |
getDiskbw()
The bandwidth available when duplicating local disk contents. |
long |
getInputbw()
Determines the total input bandwidth available for the node |
String |
getName()
|
long |
getOutputbw()
Determines the total output bandwidth available for the node |
static ResourceConsumption |
initTransfer(long size,
double limit,
NetworkNode from,
NetworkNode to,
ResourceConsumption.ConsumptionEvent e)
This function ensures the proper initialization of an individual transfer. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final MaxMinConsumer inbws
public final MaxMinProvider outbws
public final MaxMinConsumer diskinbws
public final MaxMinProvider diskoutbws
private final String name
private final HashMap<String,Integer> latencies
Constructor Detail |
---|
public NetworkNode(String id, long maxInBW, long maxOutBW, long diskBW, HashMap<String,Integer> latencymap)
maxInBW
- the input bw of the nodemaxOutBW
- the output bw of the nodediskBW
- the disk bw of the nodeMethod Detail |
---|
public long getOutputbw()
public long getInputbw()
public long getDiskbw()
public static ResourceConsumption initTransfer(long size, double limit, NetworkNode from, NetworkNode to, ResourceConsumption.ConsumptionEvent e) throws NetworkNode.NetworkException
size
- defines the size of the transfer to be simulatedfrom
- defines the source of the transferto
- defines the destination of the transfere
- defines the way the initiator will be notified upon the
completion of the transfer
NetworkNode.NetworkException
public static int checkConnectivity(NetworkNode from, NetworkNode to) throws NetworkNode.NetworkException
NetworkNode.NetworkException
public String getName()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |