PeProvisionerSimple (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.provisioners

## Class PeProvisionerSimple

- java.lang.Object
- - org.cloudbus.cloudsim.provisioners.PeProvisioner
  - - org.cloudbus.cloudsim.provisioners.PeProvisionerSimple

-     public class PeProvisionerSimple
      extends PeProvisioner

  The Class PeProvisionerSimple.
  Since:
    CloudSim Toolkit 2.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeProvisionerSimple(double availableMips)` Creates the PeProvisionerSimple object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `allocateMipsForVm(String vmUid, double mips)` Allocates MIPS for a given VM.
    `boolean` | `allocateMipsForVm(Vm vm, double mips)` Allocates MIPS for a given VM.
    `boolean` | `allocateMipsForVm(Vm vm, List<Double> mips)` Allocates MIPS for a given VM.
    `void` | `deallocateMipsForAllVms()` Releases MIPS used by all VMs.
    `void` | `deallocateMipsForVm(Vm vm)` Releases MIPS used by a VM.
    `List<Double>` | `getAllocatedMipsForVm(Vm vm)` Gets allocated MIPS for a given VM.
    `double` | `getAllocatedMipsForVmByVirtualPeId(Vm vm, int peId)` Gets allocated MIPS for a given VM for a given virtual Pe.
    `protected Map<String,List<Double>>` | `getPeTable()` Gets the pe table.
    `double` | `getTotalAllocatedMipsForVm(Vm vm)` Gets total allocated MIPS for a given VM for all PEs.
    `protected void` | `setPeTable(Map<String,? extends List<Double>> peTable)` Sets the pe table.
    `void` | `updateAvailableMips(double availableMips)`

    - ### Methods inherited from class org.cloudbus.cloudsim.provisioners.PeProvisioner

      `getAvailableMips, getMaxMips, getMips, getTotalAllocatedMips, getUtilization, setAvailableMips, setMaxMips, setMips`

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

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

- - ### Constructor Detail

    - #### PeProvisionerSimple

          public PeProvisionerSimple(double availableMips)

      Creates the PeProvisionerSimple object.
      Parameters:
        `availableMips` - the available mips

  - ### Method Detail

    - #### allocateMipsForVm

          public boolean allocateMipsForVm(Vm vm,
                                  double mips)

      Description copied from class: `PeProvisioner`
      Allocates MIPS for a given VM.
      Specified by:
        `allocateMipsForVm` in class `PeProvisioner`
      Parameters:
        `vm` - virtual machine for which the MIPS are being allocated
        `mips` - the mips
      Returns:
        $true if the MIPS could be allocated; $false otherwise

    - #### allocateMipsForVm

          public boolean allocateMipsForVm(String vmUid,
                                  double mips)

      Description copied from class: `PeProvisioner`
      Allocates MIPS for a given VM.
      Specified by:
        `allocateMipsForVm` in class `PeProvisioner`
      Parameters:
        `vmUid` - the vm uid
        `mips` - the mips
      Returns:
        $true if the MIPS could be allocated; $false otherwise

    - #### allocateMipsForVm

          public boolean allocateMipsForVm(Vm vm,
                                  List<Double> mips)

      Description copied from class: `PeProvisioner`
      Allocates MIPS for a given VM.
      Specified by:
        `allocateMipsForVm` in class `PeProvisioner`
      Parameters:
        `vm` - virtual machine for which the MIPS are being allocated
        `mips` - the mips for each virtual Pe
      Returns:
        $true if the MIPS could be allocated; $false otherwise

    - #### deallocateMipsForAllVms

          public void deallocateMipsForAllVms()

      Description copied from class: `PeProvisioner`
      Releases MIPS used by all VMs.
      Overrides:
        `deallocateMipsForAllVms` in class `PeProvisioner`

    - #### getAllocatedMipsForVmByVirtualPeId

          public double getAllocatedMipsForVmByVirtualPeId(Vm vm,
                                                  int peId)

      Description copied from class: `PeProvisioner`
      Gets allocated MIPS for a given VM for a given virtual Pe.
      Specified by:
        `getAllocatedMipsForVmByVirtualPeId` in class `PeProvisioner`
      Parameters:
        `vm` - virtual machine for which the MIPS are being allocated
        `peId` - the pe id
      Returns:
        allocated MIPS

    - #### getAllocatedMipsForVm

          public List<Double> getAllocatedMipsForVm(Vm vm)

      Description copied from class: `PeProvisioner`
      Gets allocated MIPS for a given VM.
      Specified by:
        `getAllocatedMipsForVm` in class `PeProvisioner`
      Parameters:
        `vm` - virtual machine for which the MIPS are being allocated
      Returns:
        array of allocated MIPS

    - #### getTotalAllocatedMipsForVm

          public double getTotalAllocatedMipsForVm(Vm vm)

      Description copied from class: `PeProvisioner`
      Gets total allocated MIPS for a given VM for all PEs.
      Specified by:
        `getTotalAllocatedMipsForVm` in class `PeProvisioner`
      Parameters:
        `vm` - virtual machine for which the MIPS are being allocated
      Returns:
        total allocated MIPS

    - #### deallocateMipsForVm

          public void deallocateMipsForVm(Vm vm)

      Description copied from class: `PeProvisioner`
      Releases MIPS used by a VM.
      Specified by:
        `deallocateMipsForVm` in class `PeProvisioner`
      Parameters:
        `vm` - the vm

    - #### getPeTable

          protected Map<String,List<Double>> getPeTable()

      Gets the pe table.
      Returns:
        the peTable

    - #### setPeTable

          protected void setPeTable(Map<String,? extends List<Double>> peTable)

      Sets the pe table.
      Parameters:
        `peTable` - the peTable to set

    - #### updateAvailableMips

          public void updateAvailableMips(double availableMips)

      Specified by:
        `updateAvailableMips` in class `PeProvisioner`

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