public abstract class BwProvisioner
extends java.lang.Object
| Constructor and Description |
|---|
BwProvisioner(long bw)
Creates the new BwProvisioner.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
allocateBwForVm(Vm vm,
long bw)
Allocates BW for a given VM.
|
void |
deallocateBwForAllVms()
Releases BW used by a all VMs.
|
abstract void |
deallocateBwForVm(Vm vm)
Releases BW used by a VM.
|
abstract long |
getAllocatedBwForVm(Vm vm)
Gets the allocated BW for VM.
|
long |
getAvailableBw()
Gets the available BW in the host.
|
long |
getBw()
Gets the bw.
|
long |
getUsedBw()
Gets the amount of used BW in the host.
|
abstract boolean |
isSuitableForVm(Vm vm,
long bw)
Checks if BW is suitable for vm.
|
protected void |
setAvailableBw(long availableBw)
Sets the available bw.
|
protected void |
setBw(long bw)
Sets the bw.
|
public BwProvisioner(long bw)
bw - overall amount of bandwidth available in the host.public abstract boolean allocateBwForVm(Vm vm, long bw)
vm - virtual machine for which the bw are being allocatedbw - the bwpublic abstract long getAllocatedBwForVm(Vm vm)
vm - the VMpublic abstract void deallocateBwForVm(Vm vm)
vm - the vmpublic void deallocateBwForAllVms()
public abstract boolean isSuitableForVm(Vm vm, long bw)
vm - the vmbw - the bwpublic long getBw()
protected void setBw(long bw)
bw - the new bwpublic long getAvailableBw()
public long getUsedBw()
protected void setAvailableBw(long availableBw)
availableBw - the new available bw