VmScheduler (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim

## Class VmScheduler

- java.lang.Object
- - org.cloudbus.cloudsim.VmScheduler

- Direct Known Subclasses:
    VmSchedulerSpaceShared, VmSchedulerTimeShared

      public abstract class VmScheduler
      extends Object

  VmScheduler is an abstract class that represents the policy used by a VMM to share processing power among VMs running in a host.
  Since:
    CloudSim Toolkit 1.0
  Author:
    Rodrigo N. Calheiros, Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VmScheduler(List<? extends Pe> pelist)` Creates a new HostAllocationPolicy.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `allocatePesForVm(Vm vm, List<Double> mipsShare)` Allocates PEs for a VM.
    `void` | `deallocatePesForAllVms()` Releases PEs allocated to all the VMs.
    `abstract void` | `deallocatePesForVm(Vm vm)` Releases PEs allocated to a VM.
    `List<Double>` | `getAllocatedMipsForVm(Vm vm)` Returns the MIPS share of each Pe that is allocated to a given VM.
    `double` | `getAvailableMips()` Gets the free mips.
    `double` | `getMaxAvailableMips()` Returns maximum available MIPS among all the PEs.
    `double` | `getMaxPeCapacity()` Returns PE MAXIMUM capacity in MIPS.
    `protected Map<String,List<Double>>` | `getMipsMap()` Gets the mips map.
    `double` | `getPeCapacity()` Returns PE capacity in MIPS.
    `<T extends Pe> List<T>` | `getPeList()` Gets the vm list.
    `Map<String,List<Pe>>` | `getPeMap()` Gets the pe map.
    `List<Pe>` | `getPesAllocatedForVM(Vm vm)` Gets the pes allocated for vm.
    `double` | `getTotalAllocatedMipsForVm(Vm vm)` Gets the total allocated MIPS for a VM over all the PEs.
    `List<String>` | `getVmsMigratingIn()` Gets the vms migrating in.
    `List<String>` | `getVmsMigratingOut()` Gets the vms in migration.
    `protected void` | `setAvailableMips(double availableMips)` Sets the free mips.
    `protected void` | `setMipsMap(Map<String,List<Double>> mipsMap)` Sets the mips map.
    `protected <T extends Pe> void` | `setPeList(List<T> peList)` Sets the vm list.
    `protected void` | `setPeMap(Map<String,List<Pe>> peMap)` Sets the pe map.
    `protected void` | `setVmsMigratingIn(List<String> vmsMigratingIn)` Sets the vms migrating in.
    `protected void` | `setVmsMigratingOut(List<String> vmsInMigration)` Sets the vms in migration.

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

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

- - ### Constructor Detail

    - #### VmScheduler

          public VmScheduler(List<? extends Pe> pelist)

      Creates a new HostAllocationPolicy.
      Parameters:
        `pelist` - the pelist

  - ### Method Detail

    - #### allocatePesForVm

          public abstract boolean allocatePesForVm(Vm vm,
                                 List<Double> mipsShare)

      Allocates PEs for a VM.
      Parameters:
        `vm` - the vm
        `mipsShare` - the mips share
      Returns:
        $true if this policy allows a new VM in the host, $false otherwise

    - #### deallocatePesForVm

          public abstract void deallocatePesForVm(Vm vm)

      Releases PEs allocated to a VM.
      Parameters:
        `vm` - the vm

    - #### deallocatePesForAllVms

          public void deallocatePesForAllVms()

      Releases PEs allocated to all the VMs.

    - #### getPesAllocatedForVM

          public List<Pe> getPesAllocatedForVM(Vm vm)

      Gets the pes allocated for vm.
      Parameters:
        `vm` - the vm
      Returns:
        the pes allocated for vm

    - #### getAllocatedMipsForVm

          public List<Double> getAllocatedMipsForVm(Vm vm)

      Returns the MIPS share of each Pe that is allocated to a given VM.
      Parameters:
        `vm` - the vm
      Returns:
        an array containing the amount of MIPS of each pe that is available to the VM

    - #### getTotalAllocatedMipsForVm

          public double getTotalAllocatedMipsForVm(Vm vm)

      Gets the total allocated MIPS for a VM over all the PEs.
      Parameters:
        `vm` - the vm
      Returns:
        the allocated mips for vm

    - #### getMaxAvailableMips

          public double getMaxAvailableMips()

      Returns maximum available MIPS among all the PEs.
      Returns:
        max mips

    - #### getPeCapacity

          public double getPeCapacity()

      Returns PE capacity in MIPS.
      Returns:
        mips

    - #### getMaxPeCapacity

          public double getMaxPeCapacity()

      Returns PE MAXIMUM capacity in MIPS.
      Returns:
        mips

    - #### getPeList

          public <T extends Pe> List<T> getPeList()

      Gets the vm list.
      Type Parameters:
        `T` - the generic type
      Returns:
        the vm list

    - #### setPeList

          protected <T extends Pe> void setPeList(List<T> peList)

      Sets the vm list.
      Type Parameters:
        `T` - the generic type
      Parameters:
        `peList` - the pe list

    - #### getMipsMap

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

      Gets the mips map.
      Returns:
        the mips map

    - #### setMipsMap

          protected void setMipsMap(Map<String,List<Double>> mipsMap)

      Sets the mips map.
      Parameters:
        `mipsMap` - the mips map

    - #### getAvailableMips

          public double getAvailableMips()

      Gets the free mips.
      Returns:
        the free mips

    - #### setAvailableMips

          protected void setAvailableMips(double availableMips)

      Sets the free mips.
      Parameters:
        `availableMips` - the new free mips

    - #### getVmsMigratingOut

          public List<String> getVmsMigratingOut()

      Gets the vms in migration.
      Returns:
        the vms in migration

    - #### setVmsMigratingOut

          protected void setVmsMigratingOut(List<String> vmsInMigration)

      Sets the vms in migration.
      Parameters:
        `vmsInMigration` - the new vms migrating out

    - #### getVmsMigratingIn

          public List<String> getVmsMigratingIn()

      Gets the vms migrating in.
      Returns:
        the vms migrating in

    - #### setVmsMigratingIn

          protected void setVmsMigratingIn(List<String> vmsMigratingIn)

      Sets the vms migrating in.
      Parameters:
        `vmsMigratingIn` - the new vms migrating in

    - #### getPeMap

          public Map<String,List<Pe>> getPeMap()

      Gets the pe map.
      Returns:
        the pe map

    - #### setPeMap

          protected void setPeMap(Map<String,List<Pe>> peMap)

      Sets the pe map.
      Parameters:
        `peMap` - the pe map

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