Interface PeProvisioner
- All Superinterfaces:
ResourceProvisioner
- All Known Implementing Classes:
PeProvisionerSimple
An interface that represents the provisioning policy
used by a host to provide virtual
Pes to its virtual machines.
It gets a physical PE from a Host and manages it to provide this PE as a virtual PE for
Vms. That way, a given PE might be shared between different VMs.- Since:
- CloudSim Plus 1.1
- Author:
- Manoel Campos da Silva Filho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PeProvisionerAn attribute that implements the Null Object Design Pattern for PeProvisioner objects. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallocateResourceForVm(Vm vm, long mipsCapacity) Allocates an amount of MIPS from the physical PE to a new virtual PE for a given VM.longReleases the virtual PE allocated to a given VM.longGets the amount of allocated MIPS from the physical PE to a virtual PE of a VM.longdoublevoidSets thePethat this provisioner will manage.Methods inherited from interface org.cloudsimplus.provisioners.ResourceProvisioner
allocateResourceForVm, getAvailableResource, getCapacity, getPmResource, isSuitableForVm, isSuitableForVm, setResources
-
Field Details
-
NULL
An attribute that implements the Null Object Design Pattern for PeProvisioner objects.
-
-
Method Details
-
setPe
-
allocateResourceForVm
Allocates an amount of MIPS from the physical PE to a new virtual PE for a given VM. The virtual PE to be added will use the total or partial MIPS capacity of the physical PE.- Specified by:
allocateResourceForVmin interfaceResourceProvisioner- Parameters:
vm- the virtual machine for which the new virtual PE is being allocatedmipsCapacity- the MIPS to be allocated to the virtual PE of the given VM- Returns:
trueif the virtual PE could be allocated;falseotherwise
-
getAllocatedResourceForVm
Gets the amount of allocated MIPS from the physical PE to a virtual PE of a VM.- Specified by:
getAllocatedResourceForVmin interfaceResourceProvisioner- Parameters:
vm- the virtual machine to get the allocated virtual PE MIPS- Returns:
- the allocated virtual PE MIPS
-
deallocateResourceForVm
Releases the virtual PE allocated to a given VM.- Specified by:
deallocateResourceForVmin interfaceResourceProvisioner- Parameters:
vm- the vm to release the virtual PE- Returns:
- the previously allocated MIPS for the VM's virtual PE
-
getTotalAllocatedResource
long getTotalAllocatedResource()- Specified by:
getTotalAllocatedResourcein interfaceResourceProvisioner- Returns:
- the total allocated MIPS from the physical PE.
-
getUtilization
double getUtilization()- Returns:
- the utilization percentage of the PE (in scale from 0 to 1).
-