hu.mta.sztaki.lpds.cloud.simulator.iaas
Class PhysicalMachine.ResourceAllocation
java.lang.Object
hu.mta.sztaki.lpds.cloud.simulator.DeferredEvent
hu.mta.sztaki.lpds.cloud.simulator.iaas.PhysicalMachine.ResourceAllocation
- All Implemented Interfaces:
- VirtualMachine.StateChange
- Enclosing class:
- PhysicalMachine
public class PhysicalMachine.ResourceAllocation
- extends DeferredEvent
- implements VirtualMachine.StateChange
allocated
public final ResourceConstraints allocated
realAllocated
private final ResourceConstraints realAllocated
user
private VirtualMachine user
myPromisedIndex
private final int myPromisedIndex
swept
private boolean swept
PhysicalMachine.ResourceAllocation
private PhysicalMachine.ResourceAllocation(ResourceConstraints realAlloc,
ResourceConstraints alloc,
int until)
eventAction
protected void eventAction()
- Specified by:
eventAction
in class DeferredEvent
promisedCapacityUpdater
private void promisedCapacityUpdater()
cancel
public void cancel()
- Overrides:
cancel
in class DeferredEvent
use
void use(VirtualMachine vm)
throws VMManager.VMManagementException
- Throws:
VMManager.VMManagementException
stateChanged
public void stateChanged(VirtualMachine vm,
VirtualMachine.State oldState,
VirtualMachine.State newState)
- Description copied from interface:
VirtualMachine.StateChange
- If the state of a VM is changed this function is called on all
subscribing implementations.
- Specified by:
stateChanged
in interface VirtualMachine.StateChange
oldState
- the state before the change was issuednewState
- the state after the change took effect
release
void release()
isUnUsed
public boolean isUnUsed()
isAvailable
public boolean isAvailable()
toString
public String toString()
- Overrides:
toString
in class Object
getHost
public PhysicalMachine getHost()
Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.