PowerVmAllocationPolicyAbstract (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.power

## Class PowerVmAllocationPolicyAbstract

- java.lang.Object
- - org.cloudbus.cloudsim.VmAllocationPolicy
  - - org.cloudbus.cloudsim.power.PowerVmAllocationPolicyAbstract

- Direct Known Subclasses:
    PowerVmAllocationPolicyDVFSDedicateNetworkDiskHost, PowerVmAllocationPolicyDVFSMinimumUsedHost, PowerVmAllocationPolicyMigrationAbstract, PowerVmAllocationPolicySimple, PowerVmAllocationPolicySimpleWattPerMipsMetric

      public abstract class PowerVmAllocationPolicyAbstract
      extends VmAllocationPolicy

  The class of an abstract power-aware VM allocation policy. If you are using any algorithms, policies or workload included in the power package, please cite the following paper: Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
  Since:
    CloudSim Toolkit 3.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PowerVmAllocationPolicyAbstract(List<? extends Host> list)` Instantiates a new power vm allocation policy abstract.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `allocateHostForVm(Vm vm)` Allocates a host for a given VM.
    `boolean` | `allocateHostForVm(Vm vm, Host host)` Allocates a specified host for a given VM.
    `void` | `deallocateHostForVm(Vm vm)` Releases the host used by a VM.
    `PowerHost` | `findHostForVm(Vm vm)` Find host for vm.
    `Host` | `getHost(int vmId, int userId)` Get the host that is executing the given VM belonging to the given user.
    `Host` | `getHost(Vm vm)` Get the host that is executing the given VM belonging to the given user.
    `Map<String,Host>` | `getVmTable()` Gets the vm table.
    `PowerHost` | `TryDVFSEnableHost(PowerHost host, Vm vm)`

    - ### Methods inherited from class org.cloudbus.cloudsim.VmAllocationPolicy

      `getHostList, optimizeAllocation, setHostList`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PowerVmAllocationPolicyAbstract

          public PowerVmAllocationPolicyAbstract(List<? extends Host> list)

      Instantiates a new power vm allocation policy abstract.
      Parameters:
        `list` - the list

  - ### Method Detail

    - #### allocateHostForVm

          public boolean allocateHostForVm(Vm vm,
                                  Host host)

      Description copied from class: `VmAllocationPolicy`
      Allocates a specified host for a given VM.
      Specified by:
        `allocateHostForVm` in class `VmAllocationPolicy`
      Parameters:
        `vm` - virtual machine which the host is reserved to
      Returns:
        $true if the host could be allocated; $false otherwise

    - #### allocateHostForVm

          public boolean allocateHostForVm(Vm vm)

      Description copied from class: `VmAllocationPolicy`
      Allocates a host for a given VM. The host to be allocated is the one that was already reserved.
      Specified by:
        `allocateHostForVm` in class `VmAllocationPolicy`
      Parameters:
        `vm` - virtual machine which the host is reserved to
      Returns:
        $true if the host could be allocated; $false otherwise

    - #### findHostForVm

          public PowerHost findHostForVm(Vm vm)

      Find host for vm.
      Parameters:
        `vm` - the vm
      Returns:
        the power host

    - #### TryDVFSEnableHost

          public PowerHost TryDVFSEnableHost(PowerHost host,
                                    Vm vm)

    - #### deallocateHostForVm

          public void deallocateHostForVm(Vm vm)

      Description copied from class: `VmAllocationPolicy`
      Releases the host used by a VM.
      Specified by:
        `deallocateHostForVm` in class `VmAllocationPolicy`
      Parameters:
        `vm` - the vm

    - #### getHost

          public Host getHost(Vm vm)

      Description copied from class: `VmAllocationPolicy`
      Get the host that is executing the given VM belonging to the given user.
      Specified by:
        `getHost` in class `VmAllocationPolicy`
      Parameters:
        `vm` - the vm
      Returns:
        the Host with the given vmID and userID; $null if not found

    - #### getHost

          public Host getHost(int vmId,
                     int userId)

      Description copied from class: `VmAllocationPolicy`
      Get the host that is executing the given VM belonging to the given user.
      Specified by:
        `getHost` in class `VmAllocationPolicy`
      Parameters:
        `vmId` - the vm id
        `userId` - the user id
      Returns:
        the Host with the given vmID and userID; $null if not found

    - #### getVmTable

          public Map<String,Host> getVmTable()

      Gets the vm table.
      Returns:
        the vm table

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.