Interface Pe

All Superinterfaces:
ChangeableId, Identifiable, Resource, ResourceCapacity, ResourceManageable
All Known Implementing Classes:
PeSimple

public interface Pe
extends ChangeableId, ResourceManageable
A interface to be implemented by each class that provides the basic features of a virtual or physical Processing Element (PE) of a PM or VM. Each Pe represents a virtual or physical processor core and its capacity is defined in MIPS (Million Instructions Per Second).
Since:
CloudSim Plus 1.0
Author:
Manzur Murshed, Rajkumar Buyya, Manoel Campos da Silva Filho
  • Field Details

    • NULL

      static final Pe NULL
      An attribute that implements the Null Object Design Pattern for Pe objects.
  • Method Details

    • getCapacity

      long getCapacity()
      Gets the capacity of this Pe in MIPS (Million Instructions Per Second).
      Specified by:
      getCapacity in interface ResourceCapacity
      Returns:
      the MIPS capacity
    • setCapacity

      boolean setCapacity​(long mipsCapacity)
      Sets the capacity of this Pe in MIPS (Million Instructions Per Second). If you want to have an idea of the MIPS capacity for different processors, check the link above.
      Specified by:
      setCapacity in interface ResourceManageable
      Parameters:
      mipsCapacity - the MIPS capacity to set
      Returns:
      true if mipsCapacity is greater than 0, false otherwise
      See Also:
      Resource.getAllocatedResource()
    • setCapacity

      boolean setCapacity​(double mipsCapacity)
      Sets the capacity of this Pe in MIPS (Million Instructions Per Second).

      It receives the amount of MIPS as a double value but converts it internally to a long. The method is just provided as a handy-way to define the PE capacity using a double value that usually is generated from some computations.

      If you want to have an idea of the MIPS capacity for different processors, check the link above.
      Parameters:
      mipsCapacity - the MIPS capacity to set
      Returns:
      true if mipsCapacity is greater than 0, false otherwise
    • setPeProvisioner

      Pe setPeProvisioner​(PeProvisioner peProvisioner)
      Sets the getPeProvisioner() that manages the allocation of this physical PE to virtual machines. This method is automatically called when a PeProvisioner is created passing a Pe instance. Thus, the PeProvisioner for a Pe doesn't have to be set manually.
      Parameters:
      peProvisioner - the new PE provisioner
      Returns:
    • getPeProvisioner

      PeProvisioner getPeProvisioner()
      Gets the PE provisioner that manages the allocation of this physical PE to virtual machines.
      Returns:
      the PE provisioner
    • getStatus

      Pe.Status getStatus()
      Gets the status of the PE.
      Returns:
      the PE status
    • setStatus

      boolean setStatus​(Pe.Status status)
      Sets the status of the PE.
      Parameters:
      status - the new PE status
      Returns:
      true if the status was set, false otherwise
    • isWorking

      boolean isWorking()
      Checks if the PE is working (not failed).
      Returns:
    • isFailed

      boolean isFailed()
      Checks if the PE is failed.
      Returns:
    • isFree

      boolean isFree()
      Checks if the PE is free to be used (it's idle).
      Returns:
    • isBusy

      boolean isBusy()
      Checks if the PE is busy to be used (it's being used).
      Returns: