Interface ResourceScaling

All Known Implementing Classes:
ResourceScalingGradual, ResourceScalingInstantaneous
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ResourceScaling
A FunctionalInterface to define how the capacity of the resource to be scaled by a VerticalVmScaling will be resized, according to the defined scaling factor.

The interval in which the under and overload conditions are checked is defined by the Datacenter.getSchedulingInterval(). This way, during one interval and another, there may be some SLA violation if the resource is overloaded between these intervals.

There are some implementations of this functional interface such as ResourceScalingGradual and ResourceScalingInstantaneous. New ones can be defined using Lambda Expressions.

Since:
CloudSim 1.2.0
Author:
Manoel Campos da Silva Filho
See Also:
  • Field Summary

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

    Modifier and Type
    Method
    Description
    double
    Computes the amount of resource to scale up or down, depending if the resource is over or underloaded, respectively.
  • Field Details

  • Method Details

    • getResourceAmountToScale

      double getResourceAmountToScale(VerticalVmScaling vmScaling)
      Computes the amount of resource to scale up or down, depending if the resource is over or underloaded, respectively.
      Parameters:
      vmScaling - the VerticalVmScaling object that is in charge to scale a resource.
      Returns: