VmAllocationPolicyMigrationNull

final class VmAllocationPolicyMigrationNull implements VmAllocationPolicyMigration

A class that implements the Null Object Design Pattern for VmAllocationPolicyMigration class.

Author:Manoel Campos da Silva Filho

See also: VmAllocationPolicyMigration.NULL

Methods

allocateHostForVm

public boolean allocateHostForVm(Vm vm)

allocateHostForVm

public boolean allocateHostForVm(Vm vm, Host host)

deallocateHostForVm

public void deallocateHostForVm(Vm vm)

findHostForVm

public Optional<Host> findHostForVm(Vm vm)

getDatacenter

public Datacenter getDatacenter()

getHostList

public <T extends Host> List<T> getHostList()

getMetricHistory

public Map<Host, List<Double>> getMetricHistory()

getOptimizedAllocationMap

public Map<Vm, Host> getOptimizedAllocationMap(List<? extends Vm> vmList)

getOverUtilizationThreshold

public double getOverUtilizationThreshold(Host host)

getTimeHistory

public Map<Host, List<Double>> getTimeHistory()

getUnderUtilizationThreshold

public double getUnderUtilizationThreshold()

getUtilizationHistory

public Map<Host, List<Double>> getUtilizationHistory()

isHostOverloaded

public boolean isHostOverloaded(Host host)

isHostUnderloaded

public boolean isHostUnderloaded(Host host)

scaleVmVertically

public boolean scaleVmVertically(VerticalVmScaling scaling)

setDatacenter

public void setDatacenter(Datacenter datacenter)

setFindHostForVmFunction

public void setFindHostForVmFunction(BiFunction<VmAllocationPolicy, Vm, Optional<Host>> findHostForVmFunction)

setUnderUtilizationThreshold

public void setUnderUtilizationThreshold(double underUtilizationThreshold)