NetworkDatacenter

public class NetworkDatacenter extends DatacenterSimple

NetworkDatacenter class is a Datacenter whose hostList are virtualized and networked. It contains all the information about internal network. For example, which VM is connected to what switch, etc.

Please refer to following publication for more details:

Author:Saurabh Kumar Garg, Manoel Campos da Silva Filho

Constructors

NetworkDatacenter

public NetworkDatacenter(Simulation simulation, List<? extends Host> hostList, VmAllocationPolicy vmAllocationPolicy)

Creates a NetworkDatacenter with the given parameters.

Parameters:
  • simulation – The CloudSim instance that represents the simulation the Entity is related to
  • hostList – list of Hosts that will compound the Datacenter
  • vmAllocationPolicy – the policy to be used to allocate VMs into hosts
Throws:
  • IllegalArgumentException – when this entity has zero number of PEs (Processing Elements). No PEs mean the Cloudlets can’t be processed. A CloudResource must contain one or more Machines. A Machine must contain one or more PEs.

Methods

addSwitch

public void addSwitch(Switch swt)

Adds a Switch to the Datacenter.

Parameters:
  • swt – the Switch to be added

getEdgeSwitch

public List<Switch> getEdgeSwitch()

Gets a map of all Edge Switches in the Datacenter network, where each key is the switch id and each value is the switch itself. One can design similar functions for other type of Datacenter.

getSwitchMap

public List<Switch> getSwitchMap()

Gets a read-only list of network Datacenter’s Switches.