Class VmSelectionPolicyRandomSelection
java.lang.Object
org.cloudbus.cloudsim.selectionpolicies.VmSelectionPolicyRandomSelection
- All Implemented Interfaces:
VmSelectionPolicy
public class VmSelectionPolicyRandomSelection extends Object implements VmSelectionPolicy
A VM selection policy that randomly select VMs to migrate from a host.
It uses a uniform Pseudo Random Number Generator (PRNG) as default to select VMs.
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
- Since:
- CloudSim Toolkit 3.0
- Author:
- Anton Beloglazov
-
Field Summary
Fields inherited from interface org.cloudbus.cloudsim.selectionpolicies.VmSelectionPolicy
NULL
-
Constructor Summary
Constructors Constructor Description VmSelectionPolicyRandomSelection()
Creates a PowerVmSelectionPolicyRandomSelection using a uniform Pseudo Random Number Generator (PRNG) as default to select VMs to migrate.VmSelectionPolicyRandomSelection(ContinuousDistribution rand)
Creates a PowerVmSelectionPolicyRandomSelection using a given Pseudo Random Number Generator (PRNG) to select VMs to migrate. -
Method Summary
Modifier and Type Method Description Vm
getVmToMigrate(Host host)
Gets a VM to migrate from a given host.
-
Constructor Details
-
VmSelectionPolicyRandomSelection
public VmSelectionPolicyRandomSelection()Creates a PowerVmSelectionPolicyRandomSelection using a uniform Pseudo Random Number Generator (PRNG) as default to select VMs to migrate. -
VmSelectionPolicyRandomSelection
Creates a PowerVmSelectionPolicyRandomSelection using a given Pseudo Random Number Generator (PRNG) to select VMs to migrate.- Parameters:
rand
- a Pseudo Random Number Generator (PRNG) to randomly select VMs to migrate.
-
-
Method Details
-
getVmToMigrate
Description copied from interface:VmSelectionPolicy
Gets a VM to migrate from a given host.- Specified by:
getVmToMigrate
in interfaceVmSelectionPolicy
- Parameters:
host
- the host to get a Vm to migrate from- Returns:
- the vm to migrate or
Vm.NULL
if there is not Vm to migrate
-