Interface VmAllocationPolicyMigration
- All Superinterfaces:
VmAllocationPolicy
- All Known Subinterfaces:
VmAllocationPolicyMigrationDynamicUpperThreshold
- All Known Implementing Classes:
VmAllocationPolicyBatchPlacementUnderloadedHosts,VmAllocationPolicyMigrationAbstract,VmAllocationPolicyMigrationBestFitStaticThreshold,VmAllocationPolicyMigrationDynamicUpperThresholdFirstFit,VmAllocationPolicyMigrationFirstFitStaticThreshold,VmAllocationPolicyMigrationStaticThreshold,VmAllocationPolicyMigrationWorstFitStaticThreshold
An interface to be implemented by a VM allocation policy
that detects
Host under and over CPU utilization.- Since:
- CloudSim Plus 1.0
- Author:
- Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VmAllocationPolicyMigrationAn attribute that implements the Null Object Design Pattern forVmAllocationPolicyMigrationobjects.Fields inherited from interface org.cloudsimplus.allocationpolicies.VmAllocationPolicy
DEF_HOST_COUNT_PARALLEL_SEARCH, LOGGER -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets a host CPU utilization threshold to detect over utilization.doubleGets the percentage of total Host CPU utilization to indicate when a host is under used, so that its VMs can be migrated elsewhere.Returns the policy that defines how VMs are selected for migration.booleanReturns true if there is any overloaded Host in the datacenter, false otherwise.booleanisOverloaded(Host host) Checks if a host is currently over-utilized, according to the conditions defined by the Allocation Policy.booleanReturns true if there is any underloaded Host in the datacenter, false otherwise.booleanisUnderloaded(Host host) Checks if a host is currently under utilized, according the conditions defined by the Allocation Policy implementation.default booleanReturns true if there is any under or overloaded Host, false otherwise.voidsetUnderUtilizationThreshold(double underUtilizationThreshold) Sets the percentage of total Host CPU utilization to indicate when a host is under used, so that its VMs can be migrated elsewhere.setVmSelectionPolicy(VmSelectionPolicy vmSelectionPolicy) Sets the policy that defines how VMs are selected for migration.Methods inherited from interface org.cloudsimplus.allocationpolicies.VmAllocationPolicy
allocateHostForVm, allocateHostForVm, allocateHostForVm, deallocateHostForVm, findHostForVm, getDatacenter, getHostCountForParallelSearch, getHostList, getOptimizedAllocationMap, isParallelHostSearchEnabled, isVmMigrationSupported, scaleVmVertically, setDatacenter, setFindHostForVmFunction, setHostCountForParallelSearch
-
Field Details
-
NULL
An attribute that implements the Null Object Design Pattern forVmAllocationPolicyMigrationobjects.
-
-
Method Details
-
isUnderloaded
boolean isUnderloaded()Returns true if there is any underloaded Host in the datacenter, false otherwise.- Returns:
- true if there is any underloaded Host in the datacenter, false otherwise
-
isUnderloaded
Checks if a host is currently under utilized, according the conditions defined by the Allocation Policy implementation.- Parameters:
host- the host to check- Returns:
- true if the host is under utilized, false otherwise
-
isOverloaded
boolean isOverloaded()Returns true if there is any overloaded Host in the datacenter, false otherwise.- Returns:
- true if there is any overloaded Host in the datacenter, false otherwise
-
isOverloaded
Checks if a host is currently over-utilized, according to the conditions defined by the Allocation Policy.- Parameters:
host- the host to check- Returns:
- true if the host is overloaded, false otherwise
-
getOverUtilizationThreshold
Gets a host CPU utilization threshold to detect over utilization. Whether it is a static or dynamically defined threshold depends on each allocation policy implementation.- Parameters:
host- the host to get the over utilization threshold- Returns:
- the over utilization threshold (a percentage value from 0 to 1)
-
setVmSelectionPolicy
Sets the policy that defines how VMs are selected for migration.- Parameters:
vmSelectionPolicy- the new vm selection policy- Returns:
- this VmAllocationPolicy object
-
getVmSelectionPolicy
VmSelectionPolicy getVmSelectionPolicy()Returns the policy that defines how VMs are selected for migration.- Returns:
- the policy that defines how VMs are selected for migration
-
getUnderUtilizationThreshold
double getUnderUtilizationThreshold()Gets the percentage of total Host CPU utilization to indicate when a host is under used, so that its VMs can be migrated elsewhere.- Returns:
- the under utilization threshold (a percentage value from 0 to 1)
-
setUnderUtilizationThreshold
void setUnderUtilizationThreshold(double underUtilizationThreshold) Sets the percentage of total Host CPU utilization to indicate when a host is under used, so that its VMs can be migrated elsewhere.- Parameters:
underUtilizationThreshold- the under utilization threshold (a percentage value from 0 to 1)
-
isUnderOrOverloaded
default boolean isUnderOrOverloaded()Returns true if there is any under or overloaded Host, false otherwise.- Returns:
- true if there is any under or overloaded Host, false otherwise
-