Class NetworkDatacenter

All Implemented Interfaces:
Cloneable, Comparable<SimEntity>, Runnable, Identifiable, Nameable, SimEntity, Sizeable, Datacenter, TimeZoned, PowerAware<PowerModelDatacenter>

public class NetworkDatacenter extends DatacenterSimple
NetworkDatacenter class is a Datacenter whose hosts have network support. 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
  • Constructor Details

    • NetworkDatacenter

      public NetworkDatacenter(Simulation simulation, List<? extends NetworkHost> hostList, VmAllocationPolicy vmAllocationPolicy)
      Creates a NetworkDatacenter with the given parameters.
      Parameters:
      simulation - The CloudSim instance that represents the simulation the Entity belongs 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 Host has zero number of PEs (Processing Elements).
    • NetworkDatacenter

      public NetworkDatacenter(Simulation simulation, List<? extends NetworkHost> hostList)
      Creates a NetworkDatacenter that uses a VmAllocationPolicySimple as default.
      Parameters:
      simulation - The CloudSim instance that represents the simulation the Entity belongs to
      hostList - list of Hosts that will compound the Datacenter
      Throws:
      IllegalArgumentException - when this Host has zero number of PEs (Processing Elements).
  • Method Details

    • 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.
      Returns:
    • addSwitch

      public void addSwitch(Switch swt)
      Adds a Switch to the Datacenter.
      Parameters:
      swt - the Switch to be added
    • getSwitchMap

      public List<Switch> getSwitchMap()
      Gets a read-only list of network Datacenter's Switches.
      Returns:
    • getHostList

      public List<NetworkHost> getHostList()
      Description copied from interface: Datacenter
      Gets an unmodifiable host list.
      Specified by:
      getHostList in interface Datacenter
      Overrides:
      getHostList in class DatacenterSimple
      Returns:
      the host list