Class RootSwitch

java.lang.Object
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<SimEntity>, java.lang.Runnable, Identifiable, Nameable, SimEntity, Switch

public class RootSwitch
extends AbstractSwitch
This class allows to simulate Root switch which connects Datacenters to external network. It interacts with other Datacenter in order to exchange packets.

Please refer to 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:
      Constant Field Values
    • PORTS

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

      public static final double SWITCHING_DELAY
      Default switching delay in milliseconds.
      See Also:
      Constant Field Values
    • DOWNLINK_BW

      public static final long DOWNLINK_BW
      The downlink bandwidth of RootSwitch in Megabits/s. It also represents the uplink bandwidth of connected aggregation Datacenter.
  • Constructor Details

    • RootSwitch

      public RootSwitch​(CloudSim simulation, NetworkDatacenter dc)
      Instantiates a Root AbstractSwitch specifying what other Datacenter are connected to its downlink ports, and corresponding bandwidths.
      Parameters:
      simulation - The CloudSim instance that represents the simulation the Entity is related 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 to Datacenter connected through a 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 if it is a root switch (layer 0), aggregate switch (layer 1) or edge switch (layer 2)
      Returns:
      the switch network level