Class Processor
java.lang.Object
org.cloudsimplus.resources.ResourceAbstract
org.cloudsimplus.resources.ResourceManageableAbstract
org.cloudsimplus.resources.Processor
- All Implemented Interfaces:
Resource,ResourceCapacity,ResourceManageable
- Since:
- CloudSim Plus 1.0
- Author:
- Manoel Campos da Silva Filho
-
Field Summary
FieldsFields inherited from class org.cloudsimplus.resources.ResourceAbstract
capacity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current total amount of allocated resource.longReturns the available amount of the resource that is free to be used.longdoublebooleansetCapacity(long pesNumber) Sets the number ofPes of the ProcessorvoidsetMips(double newMips) Sets the individual MIPS of eachPe.Methods inherited from class org.cloudsimplus.resources.ResourceManageableAbstract
addCapacity, allocateResource, deallocateAllResources, deallocateAndRemoveResource, deallocateResource, removeCapacity, setAllocatedResource, setAvailableResource, sumAvailableResource, sumCapacity, toStringMethods inherited from class org.cloudsimplus.resources.ResourceAbstract
isAmountAvailable, isAmountAvailable, isResourceAmountBeingUsed, isSuitableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudsimplus.resources.Resource
getPercentUtilization, getUnit, isAmountAvailable, isAmountAvailable, isAmountAvailable, isFull, isSubClassOfMethods inherited from interface org.cloudsimplus.resources.ResourceManageable
allocateResource, deallocateResource, isResourceAmountBeingUsed, isSuitable, setAllocatedResource
-
Field Details
-
NULL
-
-
Constructor Details
-
Processor
-
-
Method Details
-
getTotalMips
public double getTotalMips()- Returns:
- the sum of MIPS from all
Pes.
-
setMips
public void setMips(double newMips) Sets the individual MIPS of eachPe.- Parameters:
newMips- the new MIPS of each PE
-
getCapacity
public long getCapacity()- Returns:
- the number of Pes of the Processor
-
setCapacity
public boolean setCapacity(long pesNumber) Sets the number ofPes of the Processor- Specified by:
setCapacityin interfaceResourceManageable- Overrides:
setCapacityin classResourceManageableAbstract- Parameters:
pesNumber- the number of PEs to set- Returns:
- true if the capacity was set, false otherwise
- See Also:
-
getAvailableResource
public long getAvailableResource()Description copied from interface:ResourceReturns the available amount of the resource that is free to be used. The data unit depends on the implementing classes.- Specified by:
getAvailableResourcein interfaceResource- Overrides:
getAvailableResourcein classResourceManageableAbstract- Returns:
- the number of available PEs that are free to be used
-
getAllocatedResource
public long getAllocatedResource()Description copied from interface:ResourceReturns the current total amount of allocated resource. The data unit depends on the implementing classes, according to theResource.getUnit().- Specified by:
getAllocatedResourcein interfaceResource- Overrides:
getAllocatedResourcein classResourceAbstract- Returns:
- the number of PEs allocated
-