public abstract class VmAllocationPolicy extends Object
Constructor and Description |
---|
VmAllocationPolicy(List<? extends Host> list)
Allocates a new VmAllocationPolicy object.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
allocateHostForVm(Vm vm)
Allocates a host for a given VM.
|
abstract boolean |
allocateHostForVm(Vm vm,
Host host)
Allocates a specified host for a given VM.
|
abstract void |
deallocateHostForVm(Vm vm)
Releases the host used by a VM.
|
abstract Host |
getHost(int vmId,
int userId)
Get the host that is executing the given VM belonging to the given user.
|
abstract Host |
getHost(Vm vm)
Get the host that is executing the given VM belonging to the given user.
|
<T extends Host> |
getHostList()
Gets the host list.
|
abstract List<Map<String,Object>> |
optimizeAllocation(List<? extends Vm> vmList)
Optimize allocation of the VMs according to current utilization.
|
protected void |
setHostList(List<? extends Host> hostList)
Sets the host list.
|
public abstract boolean allocateHostForVm(Vm vm)
vm
- virtual machine which the host is reserved topublic abstract boolean allocateHostForVm(Vm vm, Host host)
vm
- virtual machine which the host is reserved topublic abstract List<Map<String,Object>> optimizeAllocation(List<? extends Vm> vmList)
vmList
- the vm listutilizationBound
- the utilization boundtime
- the timepublic abstract void deallocateHostForVm(Vm vm)
vm
- the vmpublic abstract Host getHost(Vm vm)
vm
- the vmpublic abstract Host getHost(int vmId, int userId)
vmId
- the vm iduserId
- the user idprotected void setHostList(List<? extends Host> hostList)
hostList
- the new host listCopyright © 2012 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.