VmScalingAbstract

public abstract class VmScalingAbstract implements VmScaling

A base class for implementing HorizontalVmScaling and VerticalVmScaling.

Author:Manoel Campos da Silva Filho

Constructors

VmScalingAbstract

protected VmScalingAbstract()

Methods

getVm

public Vm getVm()

isTimeToCheckPredicate

protected boolean isTimeToCheckPredicate(double time)

Checks if it is time to evaluate weather the Vm is under or overloaded.

Parameters:
  • time – current simulation time
Returns:

true if it’s time to check weather the Vm is over and underloaded, false otherwise

requestUpScaling

protected abstract boolean requestUpScaling(double time)

Performs the actual request to scale the Vm up or down, depending if it is over or underloaded, respectively. This method is automatically called by VmScaling.requestUpScalingIfPredicateMatches(org.cloudsimplus.listeners.VmHostEventInfo) when it is verified that the Vm is over or underloaded.

Parameters:
  • time – current simulation time
Returns:

true if the request was actually sent, false otherwise

setLastProcessingTime

protected void setLastProcessingTime(double lastProcessingTime)

Sets the last time the scheduler checked for VM overload.

Parameters:
  • lastProcessingTime – the processing time to set

setVm

public final VmScaling setVm(Vm vm)