Class AggregateSwitch

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

public class AggregateSwitch extends AbstractSwitch
This class represents an Aggregate Switch in a Datacenter network. It interacts with other Datacenter in order to exchange packets.

Please refer to following publication for more details:

Since:
CloudSim Toolkit 1.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:
    • SWITCHING_DELAY

      public static final double SWITCHING_DELAY
      Default delay of AggregateSwitch in milliseconds.
      See Also:
    • PORTS

      public static final int PORTS
      Default number of aggregation switch ports that defines the number of EdgeSwitch that can be connected to it.
      See Also:
  • Constructor Details

    • AggregateSwitch

      public AggregateSwitch(CloudSim simulation, NetworkDatacenter dc)
      Instantiates a Aggregate AbstractSwitch specifying the Datacenter that are connected to its downlink and uplink ports and corresponding bandwidths.
      Parameters:
      simulation - the CloudSim instance that represents the simulation the Entity belongs
      dc - The Datacenter where the switch is connected to
  • Method Details

    • processPacketDown

      protected void processPacketDown(SimEvent evt)
      Description copied from class: AbstractSwitch
      Sends a packet from uplink to Datacenter connected through a downlink port.
      Overrides:
      processPacketDown in class AbstractSwitch
      Parameters:
      evt - event/packet to process
    • processPacketUp

      protected void processPacketUp(SimEvent evt)
      Description copied from class: AbstractSwitch
      Sends a packet from down switch or host to 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