Interface VmAllocationPolicyMigration
- All Superinterfaces:
VmAllocationPolicy
- All Known Subinterfaces:
VmAllocationPolicyMigrationDynamicUpperThreshold
- All Known Implementing Classes:
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
Modifier and TypeFieldDescriptionstatic final VmAllocationPolicyMigration
An attribute that implements the Null Object Design Pattern forVmAllocationPolicyMigration
objects.Fields inherited from interface org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicy
DEF_HOST_COUNT_PARALLEL_SEARCH, LOGGER
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if there are some Hosts overloaded.boolean
Checks if there are some Hosts underloaded.default boolean
Checks if there are some Hosts either under or overloaded.double
Gets the host CPU utilization threshold to detect over utilization.double
Gets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.Gets the the policy that defines how VMs are selected for migration.boolean
isHostOverloaded
(Host host) Checks if host is currently over utilized, according the conditions defined by the Allocation Policy.boolean
isHostUnderloaded
(Host host) Checks if host is currently under utilized, according the conditions defined by the Allocation Policy.void
setUnderUtilizationThreshold
(double underUtilizationThreshold) Sets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.void
setVmSelectionPolicy
(VmSelectionPolicy vmSelectionPolicy) Sets the the policy that defines how VMs are selected for migration.Methods inherited from interface org.cloudbus.cloudsim.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 forVmAllocationPolicyMigration
objects.
-
-
Method Details
-
isHostUnderloaded
Checks if host is currently under utilized, according the conditions defined by the Allocation Policy.- Parameters:
host
- the host- Returns:
- true, if the host is under utilized; false otherwise
-
isHostOverloaded
Checks if host is currently over utilized, according the conditions defined by the Allocation Policy.- Parameters:
host
- the host to check- Returns:
- true, if the host is over utilized; false otherwise
-
getOverUtilizationThreshold
Gets the host CPU utilization threshold to detect over utilization. It is a percentage value from 0 to 1. Whether it is a static or dynamically defined threshold depends on each implementing class.- Parameters:
host
- the host to get the over utilization threshold- Returns:
- the over utilization threshold
-
setVmSelectionPolicy
Sets the the policy that defines how VMs are selected for migration.- Parameters:
vmSelectionPolicy
- the new vm selection policy
-
getVmSelectionPolicy
VmSelectionPolicy getVmSelectionPolicy()Gets the the policy that defines how VMs are selected for migration.- Returns:
- the
VmSelectionPolicy
.
-
getUnderUtilizationThreshold
double getUnderUtilizationThreshold()Gets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.- Returns:
- the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)
-
setUnderUtilizationThreshold
void setUnderUtilizationThreshold(double underUtilizationThreshold) Sets the percentage of total CPU utilization to indicate that a host is under used and its VMs have to be migrated.- Parameters:
underUtilizationThreshold
- the under utilization threshold (in scale is from 0 to 1, where 1 is 100%)
-
areHostsUnderloaded
boolean areHostsUnderloaded()Checks if there are some Hosts underloaded.- Returns:
-
areHostsOverloaded
boolean areHostsOverloaded()Checks if there are some Hosts overloaded.- Returns:
-
areHostsUnderOrOverloaded
default boolean areHostsUnderOrOverloaded()Checks if there are some Hosts either under or overloaded.- Returns:
-