Interface NetworkTopology
-
- All Known Implementing Classes:
BriteNetworkTopology
public interface NetworkTopology
Implements a network layer by reading the topology from a file in a specific format that is defined by each implementing class.- Since:
- CloudSim Plus 1.0
- Author:
- Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho
- See Also:
BriteNetworkTopology
-
-
Field Summary
Fields Modifier and Type Field Description static NetworkTopology
NULL
An attribute that implements the Null Object Design Pattern forNetworkTopology
objects.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLink(long srcId, long destId, double bw, double lat)
Adds a new link in the network topology.double
getDelay(long srcID, long destID)
Calculates the delay between two nodes.TopologicalGraph
getTopologycalGraph()
boolean
isNetworkEnabled()
Checks if the network simulation is working.void
mapNode(long cloudSimEntityID, int briteID)
Maps a CloudSim entity to a BRITE node in the network topology.void
unmapNode(long cloudSimEntityID)
Unmaps a previously mapped CloudSim entity to a BRITE node in the network topology.
-
-
-
Field Detail
-
NULL
static final NetworkTopology NULL
An attribute that implements the Null Object Design Pattern forNetworkTopology
objects.
-
-
Method Detail
-
addLink
void addLink(long srcId, long destId, double bw, double lat)
Adds a new link in the network topology. The CloudSim entities that represent the source and destination of the link will be mapped to BRITE entities.- Parameters:
srcId
- ID of the CloudSim entity that represents the link's source nodedestId
- ID of the CloudSim entity that represents the link's destination nodebw
- Link's bandwidthlat
- link's latency- To do something:
- It should receive entities instead of IDs
-
mapNode
void mapNode(long cloudSimEntityID, int briteID)
Maps a CloudSim entity to a BRITE node in the network topology.- Parameters:
cloudSimEntityID
- ID of the entity being mappedbriteID
- ID of the BRITE node that corresponds to the CloudSim- To do something:
- It should receive an CloudSim entity instead of an ID
-
unmapNode
void unmapNode(long cloudSimEntityID)
Unmaps a previously mapped CloudSim entity to a BRITE node in the network topology.- Parameters:
cloudSimEntityID
- ID of the entity being unmapped- To do something:
- It should receive an CloudSim entity instead of an ID
-
getDelay
double getDelay(long srcID, long destID)
Calculates the delay between two nodes.- Parameters:
srcID
- ID of the CloudSim entity that represents the link's source nodedestID
- ID of the CloudSim entity that represents the link's destination node- Returns:
- communication delay between the two nodes
- To do something:
- It should receive entities instead of IDs
-
isNetworkEnabled
boolean isNetworkEnabled()
Checks if the network simulation is working. If there were some problem during creation of network (e.g., during parsing of BRITE file) that does not allow a proper simulation of the network, this method returns false.- Returns:
- $true if network simulation is working, $false otherwise
-
getTopologycalGraph
TopologicalGraph getTopologycalGraph()
- Returns:
- the graph
-
-