public abstract class PeProvisioner
extends java.lang.Object
| Constructor and Description |
|---|
PeProvisioner(double mips)
Creates the new PeProvisioner.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
allocateMipsForVm(java.lang.String vmUid,
double mips)
Allocates MIPS for a given VM.
|
abstract boolean |
allocateMipsForVm(Vm vm,
double mips)
Allocates MIPS for a given VM.
|
abstract boolean |
allocateMipsForVm(Vm vm,
java.util.List<java.lang.Double> mips)
Allocates MIPS for a given VM.
|
void |
deallocateMipsForAllVms()
Releases MIPS used by all VMs.
|
abstract void |
deallocateMipsForVm(Vm vm)
Releases MIPS used by a VM.
|
abstract java.util.List<java.lang.Double> |
getAllocatedMipsForVm(Vm vm)
Gets allocated MIPS for a given VM.
|
abstract double |
getAllocatedMipsForVmByVirtualPeId(Vm vm,
int peId)
Gets allocated MIPS for a given VM for a given virtual Pe.
|
double |
getAvailableMips()
Gets the available MIPS in the PE.
|
double |
getMips()
Gets the MIPS.
|
double |
getTotalAllocatedMips()
Gets the total allocated MIPS.
|
abstract double |
getTotalAllocatedMipsForVm(Vm vm)
Gets total allocated MIPS for a given VM for all PEs.
|
double |
getUtilization()
Gets the utilization of the Pe in percents.
|
protected void |
setAvailableMips(double availableMips)
Sets the available MIPS.
|
void |
setMips(double mips)
Sets the MIPS.
|
public PeProvisioner(double mips)
mips - overall amount of MIPS available in the Pepublic abstract boolean allocateMipsForVm(Vm vm, double mips)
vm - virtual machine for which the MIPS are being allocatedmips - the mipspublic abstract boolean allocateMipsForVm(java.lang.String vmUid,
double mips)
vmUid - the vm uidmips - the mipspublic abstract boolean allocateMipsForVm(Vm vm, java.util.List<java.lang.Double> mips)
vm - virtual machine for which the MIPS are being allocatedmips - the mips for each virtual Pepublic abstract java.util.List<java.lang.Double> getAllocatedMipsForVm(Vm vm)
vm - virtual machine for which the MIPS are being allocatedpublic abstract double getTotalAllocatedMipsForVm(Vm vm)
vm - virtual machine for which the MIPS are being allocatedpublic abstract double getAllocatedMipsForVmByVirtualPeId(Vm vm, int peId)
vm - virtual machine for which the MIPS are being allocatedpeId - the pe idpublic abstract void deallocateMipsForVm(Vm vm)
vm - the vmpublic void deallocateMipsForAllVms()
public double getMips()
public void setMips(double mips)
mips - the MIPS to setpublic double getAvailableMips()
protected void setAvailableMips(double availableMips)
availableMips - the availableMips to setpublic double getTotalAllocatedMips()
public double getUtilization()