Interface Pe
- All Superinterfaces:
ChangeableId,Identifiable,Resource,ResourceCapacity,ResourceManageable
- All Known Implementing Classes:
PeSimple
An interface to be implemented by each class that provides
the basic features for a virtual or physical Processing Element (PE)
of a
Host 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
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongGets the capacity of this Pe in MIPS (Million Instructions Per Second).Gets thePeProvisionerthat manages the allocation of this physical PE toVms.booleanisBusy()Checks if the PE is busy to be used (it's being used).booleanisFailed()Checks if the PE is failed.booleanisFree()Checks if the PE is free to be used (it's idle).booleanChecks if the PE is working (not failed).booleansetCapacity(double mipsCapacity) Sets the capacity of this Pe in MIPS (Million Instructions Per Second).booleansetCapacity(long mipsCapacity) Sets the capacity of this Pe in MIPS (Million Instructions Per Second).setPeProvisioner(PeProvisioner peProvisioner) Sets thegetPeProvisioner()that manages the allocation of this physical PE toVms.Sets the status of the PE.Methods inherited from interface org.cloudsimplus.core.ChangeableId
setIdMethods inherited from interface org.cloudsimplus.core.Identifiable
getIdMethods inherited from interface org.cloudsimplus.resources.Resource
getAllocatedResource, getAvailableResource, getPercentUtilization, getUnit, isAmountAvailable, isAmountAvailable, isAmountAvailable, isFull, isSubClassOfMethods inherited from interface org.cloudsimplus.resources.ResourceManageable
addCapacity, allocateResource, allocateResource, deallocateAllResources, deallocateAndRemoveResource, deallocateResource, deallocateResource, isResourceAmountBeingUsed, isSuitable, removeCapacity, setAllocatedResource, setAllocatedResource, sumCapacity
-
Field Details
-
NULL
-
-
Method Details
-
getCapacity
long getCapacity()Gets the capacity of this Pe in MIPS (Million Instructions Per Second).- Specified by:
getCapacityin interfaceResourceCapacity- 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:
setCapacityin interfaceResourceManageable- Parameters:
mipsCapacity- the MIPS capacity to set- Returns:
- true if mipsCapacity is greater than 0, false otherwise
- See Also:
-
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
doublevalue but converts it internally to along. The method is just provided as a handy way to define the PE capacity using adoublevalue 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
mipsCapacityis greater than 0, false otherwise
-
setPeProvisioner
Sets thegetPeProvisioner()that manages the allocation of this physical PE toVms. This method is automatically called when aPeProvisioneris 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:
- this instance
-
getPeProvisioner
PeProvisioner getPeProvisioner()Gets thePeProvisionerthat manages the allocation of this physical PE toVms.- Returns:
- the PE provisioner
-
getStatus
Pe.Status getStatus()- Returns:
- the status of the PE.
-
setStatus
-
isWorking
boolean isWorking()Checks if the PE is working (not failed).- Returns:
- true if the PE is working, false otherwise
-
isFailed
boolean isFailed()Checks if the PE is failed.- Returns:
- true if the PE is failed, false otherwise
-
isFree
boolean isFree()Checks if the PE is free to be used (it's idle).- Returns:
- true if the PE is free, false otherwise
-
isBusy
boolean isBusy()Checks if the PE is busy to be used (it's being used).- Returns:
- true if the PE is busy, false otherwise
-