Class RootSwitch

All Implemented Interfaces:
Comparable<SimEntity>, Runnable, Identifiable, Nameable, SimEntity, Switch

public class RootSwitch extends AbstractSwitch
Allows simulating a Root switch that connects Datacenters to an external network. It interacts with another Datacenter to exchange packets.

Please refer to the following publication for more details:

Since:
CloudSim Toolkit 3.0
Author:
Saurabh Kumar Garg, Manoel Campos da Silva Filho
  • Field Details

    • LEVEL

      public static final int LEVEL
      The level (layer) of the switch in the network topology.
      See Also:
    • PORTS

      public static final int PORTS
      Default number of root switch ports that defines the number of AggregateSwitches that can be connected to it.
      See Also:
    • SWITCHING_DELAY

      public static final double SWITCHING_DELAY
      Default switching delay in milliseconds.
      See Also:
  • Constructor Details

    • RootSwitch

      public RootSwitch(CloudSimPlus simulation, NetworkDatacenter dc)
      Instantiates a Root Switch, specifying which another Datacenter is connected to its downlink ports and corresponding bandwidths.
      Parameters:
      simulation - the CloudSimPlus instance that represents the simulation the Switch belongs to
      dc - the Datacenter where the Switch is connected to
  • Method Details

    • processPacketUp

      protected void processPacketUp(SimEvent evt)
      Description copied from class: AbstractSwitch
      Sends a packet from a down switch or host to the Datacenter connected through an uplink port.
      Overrides:
      processPacketUp in class AbstractSwitch
      Parameters:
      evt - Event/packet to process
    • getLevel

      public int getLevel()
      Description copied from interface: Switch
      Gets the level (layer) of the Switch in the network topology, depending on whether it is a RootSwitch (layer 0), AggregateSwitch (layer 1) or EdgeSwitch (layer 2).
      Returns:
      the switch network level