HorizontalVmScalingSimple

public class HorizontalVmScalingSimple extends VmScalingAbstract implements HorizontalVmScaling

A HorizontalVmScaling implementation that allows defining the condition to identify an overloaded VM, based on any desired criteria, such as current RAM, CPU and/or Bandwidth utilization. A DatacenterBroker monitors the VMs that have an HorizontalVmScaling object in order to create or destroy VMs on demand.

The overload condition has to be defined by providing a Predicate using the setOverloadPredicate(Predicate) method. Check the HorizontalVmScaling documentation for details on how to enable horizontal down scaling using the DatacenterBroker.

Author:Manoel Campos da Silva Filho

See also: HorizontalVmScaling

Constructors

HorizontalVmScalingSimple

public HorizontalVmScalingSimple()

Methods

getOverloadPredicate

public Predicate<Vm> getOverloadPredicate()

getVmSupplier

public Supplier<Vm> getVmSupplier()

requestUpScaling

protected boolean requestUpScaling(double time)

requestUpScalingIfPredicateMatches

public final boolean requestUpScalingIfPredicateMatches(VmHostEventInfo evt)

setOverloadPredicate

public VmScaling setOverloadPredicate(Predicate<Vm> predicate)

setVmSupplier

public final HorizontalVmScaling setVmSupplier(Supplier<Vm> supplier)