Interface VmScaling

All Known Subinterfaces:
HorizontalVmScaling, VerticalVmScaling
All Known Implementing Classes:
HorizontalVmScalingSimple, VerticalVmScalingAbstract, VerticalVmScalingSimple, VmScalingAbstract

public interface VmScaling
An interface to allow implementing horizontal and vertical scaling of Vms.
Since:
CloudSim Plus 1.0.0
Author:
Manoel Campos da Silva Filho
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     
    static final VmScaling
    An attribute that implements the Null Object Design Pattern for VmScaling objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the Vm that this Load Balancer is linked to.
    boolean
    Requests the Vm to be scaled up or down if it is over or underloaded, respectively.
    void
    setVm(Vm vm)
    Sets a Vm to this Load Balancer.
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • NULL

      static final VmScaling NULL
      An attribute that implements the Null Object Design Pattern for VmScaling objects.
  • Method Details

    • getVm

      Vm getVm()
      Gets the Vm that this Load Balancer is linked to.
      Returns:
    • setVm

      void setVm(Vm vm)
      Sets a Vm to this Load Balancer. The broker will call this Load Balancer in order to balance load when its Vm is over utilized.

      When the VmScaling is assigned to a Vm, the Vm sets itself to the VmScaling object, creating an association between the two objects.

      Parameters:
      vm - the Vm to set
    • requestUpScalingIfPredicateMatches

      boolean requestUpScalingIfPredicateMatches(VmHostEventInfo evt)
      Requests the Vm to be scaled up or down if it is over or underloaded, respectively. The scaling request will be sent to the DatacenterBroker only if the under or overload condition is met, that depends on the implementation of the scaling mechanisms.

      The Vm to which this scaling object is related to, creates an UpdateProcessingListener that will call this method to check if it time to perform an down or up scaling, every time the Vm processing is updated.

      Parameters:
      evt - event information, including the current simulation time and the VM to be scaled
      Returns:
      true if the Vm is over or underloaded and up or down scaling request was sent to the broker; false otherwise