public abstract class RamProvisioner
extends java.lang.Object
| Constructor and Description |
|---|
RamProvisioner(int ram)
Creates the new RamProvisioner.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
allocateRamForVm(Vm vm,
int ram)
Allocates RAM for a given VM.
|
void |
deallocateRamForAllVms()
Releases BW used by a all VMs.
|
abstract void |
deallocateRamForVm(Vm vm)
Releases BW used by a VM.
|
abstract int |
getAllocatedRamForVm(Vm vm)
Gets the allocated RAM for VM.
|
int |
getAvailableRam()
Gets the available RAM in the host.
|
int |
getRam()
Gets the ram.
|
int |
getUsedRam()
Gets the amount of used RAM in the host.
|
abstract boolean |
isSuitableForVm(Vm vm,
int ram)
Checks if is suitable for vm.
|
protected void |
setAvailableRam(int availableRam)
Sets the available ram.
|
protected void |
setRam(int ram)
Sets the ram.
|
public RamProvisioner(int ram)
ram - the rampublic abstract boolean allocateRamForVm(Vm vm, int ram)
vm - virtual machine for which the RAM are being allocatedram - the RAMpublic abstract int getAllocatedRamForVm(Vm vm)
vm - the VMpublic abstract void deallocateRamForVm(Vm vm)
vm - the vmpublic void deallocateRamForAllVms()
public abstract boolean isSuitableForVm(Vm vm, int ram)
vm - the vmram - the rampublic int getRam()
protected void setRam(int ram)
ram - the ram to setpublic int getUsedRam()
public int getAvailableRam()
protected void setAvailableRam(int availableRam)
availableRam - the availableRam to set