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
AFunctionalInterface
to define how the capacity of the resource to be scaled by aVerticalVmScaling
will be resized, according to the definedscaling 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
andResourceScalingInstantaneous
. New ones can be defined using Lambda Expressions.- Since:
- CloudSim 1.2.0
- Author:
- Manoel Campos da Silva Filho
- See Also:
ResourceScalingGradual
,ResourceScalingInstantaneous
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceScaling
NULL
An attribute that implements the Null Object Design Pattern forResourceScaling
objects.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getResourceAmountToScale(VerticalVmScaling vmScaling)
Computes the amount of resource to scale up or down, depending if the resource is over or underloaded, respectively.
-
-
-
Field Detail
-
NULL
static final ResourceScaling NULL
An attribute that implements the Null Object Design Pattern forResourceScaling
objects.
-
-
Method Detail
-
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
- theVerticalVmScaling
object that is in charge to scale a resource.- Returns:
-
-