public abstract class PowerVmAllocationPolicyAbstract extends VmAllocationPolicy
| Constructor and Description |
|---|
PowerVmAllocationPolicyAbstract(java.util.List<? extends Host> list)
Instantiates a new power vm allocation policy abstract.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allocateHostForVm(Vm vm)
Allocates a host for a given VM.
|
boolean |
allocateHostForVm(Vm vm,
Host host)
Allocates a specified host for a given VM.
|
void |
deallocateHostForVm(Vm vm)
Releases the host used by a VM.
|
PowerHost |
findHostForVm(Vm vm)
Find host for vm.
|
Host |
getHost(int vmId,
int userId)
Get the host that is executing the given VM belonging to the given user.
|
Host |
getHost(Vm vm)
Get the host that is executing the given VM belonging to the given user.
|
java.util.Map<java.lang.String,Host> |
getVmTable()
Gets the vm table.
|
getHostList, optimizeAllocation, setHostListpublic PowerVmAllocationPolicyAbstract(java.util.List<? extends Host> list)
list - the listpublic boolean allocateHostForVm(Vm vm)
VmAllocationPolicyallocateHostForVm in class VmAllocationPolicyvm - virtual machine which the host is reserved topublic boolean allocateHostForVm(Vm vm, Host host)
VmAllocationPolicyallocateHostForVm in class VmAllocationPolicyvm - virtual machine which the host is reserved topublic PowerHost findHostForVm(Vm vm)
vm - the vmpublic void deallocateHostForVm(Vm vm)
VmAllocationPolicydeallocateHostForVm in class VmAllocationPolicyvm - the vmpublic Host getHost(Vm vm)
VmAllocationPolicygetHost in class VmAllocationPolicyvm - the vmpublic Host getHost(int vmId, int userId)
VmAllocationPolicygetHost in class VmAllocationPolicyvmId - the vm iduserId - the user idpublic java.util.Map<java.lang.String,Host> getVmTable()