|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthu.mta.sztaki.lpds.cloud.simulator.iaas.IaaSService
public class IaaSService
This class represents a single IaaS service. It's tasks are the maintenance and management of the physical machines and the scheduling of the VM requests among the PMs.
Nested Class Summary | |
---|---|
static class |
IaaSService.IaaSHandlingException
This class represents a generic error that occurred during the operation of the IaaS service. |
protected class |
IaaSService.MachineListener
|
Nested classes/interfaces inherited from interface hu.mta.sztaki.lpds.cloud.simulator.iaas.VMManager |
---|
VMManager.CapacityChangeEvent<F>, VMManager.NoSuchVMException, VMManager.VMManagementException |
Field Summary | |
---|---|
private CopyOnWriteArrayList<VMManager.CapacityChangeEvent<PhysicalMachine>> |
capacityListeners
|
private ArrayList<PhysicalMachine> |
internalMachines
The order of internal machines is not guaranteed |
private ArrayList<Repository> |
internalRepositories
The order of internal repositories is not guaranteed |
private ArrayList<PhysicalMachine> |
internalRunningMachines
|
private CopyOnWriteArrayList<IaaSService.MachineListener> |
listeners
|
List<PhysicalMachine> |
machines
|
PhysicalMachineController |
pmcontroller
|
List<Repository> |
repositories
|
private ResourceConstraints |
runningCapacity
|
List<PhysicalMachine> |
runningMachines
|
Scheduler |
sched
|
private ResourceConstraints |
totalCapacity
|
Constructor Summary | |
---|---|
IaaSService(Class<? extends Scheduler> s,
Class<? extends PhysicalMachineController> c)
|
Method Summary | |
---|---|
void |
bulkHostRegistration(List<PhysicalMachine> newPMs)
|
private PhysicalMachine |
checkVMHost(VirtualMachine vm)
|
void |
deregisterHost(PhysicalMachine pm)
This function allows the IaaS to reduce in size. |
void |
deregisterRepository(Repository r)
This function allows the IaaS to reduce its storage capacities. |
ResourceConstraints |
getCapacities()
|
ResourceConstraints |
getRunningCapacities()
|
boolean |
isRegisteredHost(PhysicalMachine pm)
|
Collection<VirtualMachine> |
listVMs()
Provides an overview on the VMs currently in the system |
void |
migrateVM(VirtualMachine vm,
IaaSService target)
Migrates a VM from the current system to another. |
private void |
notifyCapacityListeners(List<PhysicalMachine> changes)
|
private void |
realDeregistration(PhysicalMachine pm)
|
void |
reallocateResources(VirtualMachine vm,
ResourceConstraints newresources)
Allows fine-grained resource utilization setup of the particular VM after it was allocated on the system. |
void |
registerHost(PhysicalMachine pm)
This function allows the IaaS to grow in size |
void |
registerRepository(Repository r)
This function allows the IaaS to grow its storage capacities |
VirtualMachine[] |
requestVM(VirtualAppliance va,
ResourceConstraints rc,
Repository vaSource,
int count)
|
VirtualMachine[] |
requestVM(VirtualAppliance va,
ResourceConstraints rc,
Repository vaSource,
int count,
HashMap<String,Object> schedulingConstraints)
Creates a new VM in the system and immediately returns with a new VM object. |
void |
subscribeToCapacityChanges(VMManager.CapacityChangeEvent<PhysicalMachine> e)
|
void |
terminateVM(VirtualMachine vm,
boolean killTasks)
Terminates a VM in the system. |
String |
toString()
|
void |
unsubscribeFromCapacityChanges(VMManager.CapacityChangeEvent<PhysicalMachine> e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private ArrayList<PhysicalMachine> internalMachines
private ArrayList<PhysicalMachine> internalRunningMachines
private CopyOnWriteArrayList<IaaSService.MachineListener> listeners
public List<PhysicalMachine> machines
public List<PhysicalMachine> runningMachines
private ResourceConstraints totalCapacity
private ResourceConstraints runningCapacity
private CopyOnWriteArrayList<VMManager.CapacityChangeEvent<PhysicalMachine>> capacityListeners
private ArrayList<Repository> internalRepositories
public List<Repository> repositories
public final Scheduler sched
public final PhysicalMachineController pmcontroller
Constructor Detail |
---|
public IaaSService(Class<? extends Scheduler> s, Class<? extends PhysicalMachineController> c) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException
SecurityException
Method Detail |
---|
public void migrateVM(VirtualMachine vm, IaaSService target)
VMManager
migrateVM
in interface VMManager<IaaSService,PhysicalMachine>
vm
- the VM to be relocatedtarget
- the target system that should host the VM in the futureprivate PhysicalMachine checkVMHost(VirtualMachine vm) throws VMManager.NoSuchVMException
VMManager.NoSuchVMException
public void reallocateResources(VirtualMachine vm, ResourceConstraints newresources) throws VMManager.NoSuchVMException, VMManager.VMManagementException
VMManager
reallocateResources
in interface VMManager<IaaSService,PhysicalMachine>
vm
- The VM to be adjustednewresources
- The new amount of resources needed (this could not only raise
the available resources of the VM but also decrease them
VMManager.NoSuchVMException
- if the request was issued for a VM unknown in the system
VMManager.VMManagementException
- if the request cannot be fulfilled for some reasonpublic VirtualMachine[] requestVM(VirtualAppliance va, ResourceConstraints rc, Repository vaSource, int count) throws VMManager.VMManagementException, NetworkNode.NetworkException
VMManager.VMManagementException
NetworkNode.NetworkException
public VirtualMachine[] requestVM(VirtualAppliance va, ResourceConstraints rc, Repository vaSource, int count, HashMap<String,Object> schedulingConstraints) throws VMManager.VMManagementException, NetworkNode.NetworkException
VMManager
requestVM
in interface VMManager<IaaSService,PhysicalMachine>
va
- the kind of VM to be created
VMManager.VMManagementException
- if the request cannot be fulfilled for some reason
NetworkNode.NetworkException
public void terminateVM(VirtualMachine vm, boolean killTasks) throws VMManager.NoSuchVMException, VMManager.VMManagementException
VMManager
terminateVM
in interface VMManager<IaaSService,PhysicalMachine>
vm
- the VM to be terminated
VMManager.NoSuchVMException
- if the request was issued for a VM unknown in the system
VMManager.VMManagementException
- if the request cannot be fulfilled for some reasonpublic Collection<VirtualMachine> listVMs()
VMManager
listVMs
in interface VMManager<IaaSService,PhysicalMachine>
public void registerHost(PhysicalMachine pm)
pm
- the new physical machine to be utilized within the systempublic void bulkHostRegistration(List<PhysicalMachine> newPMs)
private void realDeregistration(PhysicalMachine pm)
public void deregisterHost(PhysicalMachine pm) throws IaaSService.IaaSHandlingException
pm
- the physical machine to be dropped from the control of the
system
IaaSService.IaaSHandlingException
public void registerRepository(Repository r)
r
- the new repository to be utilized within the systempublic void deregisterRepository(Repository r) throws IaaSService.IaaSHandlingException
pm
- the physical machine to be dropped from the control of the
system
IaaSService.IaaSHandlingException
public ResourceConstraints getCapacities()
getCapacities
in interface VMManager<IaaSService,PhysicalMachine>
public ResourceConstraints getRunningCapacities()
public void subscribeToCapacityChanges(VMManager.CapacityChangeEvent<PhysicalMachine> e)
subscribeToCapacityChanges
in interface VMManager<IaaSService,PhysicalMachine>
public void unsubscribeFromCapacityChanges(VMManager.CapacityChangeEvent<PhysicalMachine> e)
unsubscribeFromCapacityChanges
in interface VMManager<IaaSService,PhysicalMachine>
private void notifyCapacityListeners(List<PhysicalMachine> changes)
public boolean isRegisteredHost(PhysicalMachine pm)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |