public final class BriteNetworkTopology extends Object implements NetworkTopology
The topology file may contain more nodes than the number of entities in the simulation. It allows users to increase the scale of the simulation without changing the topology file. Nevertheless, each CloudSim entity must be mapped to one (and only one) BRITE node to allow proper work of the network simulation. Each BRITE node can be mapped to only one entity at a time.
getInstance(String)
,
Brite Oficial Website (shut down),
Web archieve of Brite Oficial WebsiteNULL
Constructor and Description |
---|
BriteNetworkTopology()
Instantiates a Network Topology.
|
BriteNetworkTopology(String filePath)
Instantiates a Network Topology if a given file exists and can be successfully
parsed.
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(SimEntity src,
SimEntity dest,
double bandwidth,
double latency)
Adds a new link in the network topology.
|
double[][] |
getBwMatrix()
Gets acopy of the matrix containing the bandwidth between every pair of nodes in the
network.
|
double |
getDelay(SimEntity src,
SimEntity dest)
Calculates the delay between two nodes.
|
static BriteNetworkTopology |
getInstance(String fileName)
Instantiates a Network Topology from a file inside the application's resource directory.
|
TopologicalGraph |
getTopologicalGraph()
Gets the Topological Graph of the network.
|
boolean |
isNetworkEnabled()
Checks if the network simulation is working.
|
void |
mapNode(SimEntity entity,
int briteID)
Maps a CloudSim entity to a BRITE node in the network topology.
|
void |
removeLink(SimEntity src,
SimEntity dest) |
void |
unmapNode(SimEntity entity)
Un-maps a previously mapped CloudSim entity to a BRITE node in the network
topology.
|
public BriteNetworkTopology()
public BriteNetworkTopology(String filePath)
filePath
- the path of the BRITE fileBriteNetworkTopology()
,
BriteNetworkTopology(InputStreamReader)
,
getInstance(String)
public static BriteNetworkTopology getInstance(String fileName)
fileName
- the relative name of the BRITE filepublic void addLink(SimEntity src, SimEntity dest, double bandwidth, double latency)
NetworkTopology
addLink
in interface NetworkTopology
src
- CloudSim entity that represents the link's source
nodedest
- CloudSim entity that represents the link's
destination nodebandwidth
- Link's bandwidthlatency
- link's latencypublic void removeLink(SimEntity src, SimEntity dest)
removeLink
in interface NetworkTopology
public void mapNode(SimEntity entity, int briteID)
entity
- CloudSim entity being mappedbriteID
- ID of the BRITE node that corresponds to the CloudSimpublic void unmapNode(SimEntity entity)
entity
- CloudSim entity being unmappedpublic double getDelay(SimEntity src, SimEntity dest)
NetworkTopology
getDelay
in interface NetworkTopology
src
- CloudSim entity that represents the link's source
nodedest
- CloudSim entity that represents the link's
destination nodepublic boolean isNetworkEnabled()
public TopologicalGraph getTopologicalGraph()
public double[][] getBwMatrix()
Copyright © 2015–2021 Systems, Security and Image Communication Lab - Instituto de Telecomunicações (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO). All rights reserved.