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()

getOptimizedAllocationMap

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

getOverUtilizationThreshold

public double getOverUtilizationThreshold(Host host)

getUnderUtilizationThreshold

public double getUnderUtilizationThreshold()

getVmSelectionPolicy

public VmSelectionPolicy getVmSelectionPolicy()

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)

setVmSelectionPolicy

public void setVmSelectionPolicy(VmSelectionPolicy vmSelectionPolicy)