hu.mta.sztaki.lpds.cloud.simulator.energy.specialized
Class IaaSEnergyMeter

java.lang.Object
  extended by hu.mta.sztaki.lpds.cloud.simulator.Timed
      extended by hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter
          extended by hu.mta.sztaki.lpds.cloud.simulator.energy.AggregatedEnergyMeter
              extended by hu.mta.sztaki.lpds.cloud.simulator.energy.specialized.IaaSEnergyMeter
All Implemented Interfaces:
VMManager.CapacityChangeEvent<PhysicalMachine>, Comparable<Timed>

public class IaaSEnergyMeter
extends AggregatedEnergyMeter
implements VMManager.CapacityChangeEvent<PhysicalMachine>

Allows a complete IaaS system to be monitored energywise with single energy metering operations.

Author:
"Gabor Kecskemeti, Laboratory of Parallel and Distributed Systems, MTA SZTAKI (c) 2015"

Field Summary
private  IaaSService observed
          The IaaSService to be observed with this meter
private  ResourceConstraints oldCapacity
          record of the past capacity on the observed IaaSservice (used to determine in which direction did its capacity change).
 
Fields inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.AggregatedEnergyMeter
supervised
 
Fields inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter
lastMetered
 
Constructor Summary
IaaSEnergyMeter(IaaSService iaas)
          Allows the construction of a new metering object building on top of the generic aggregated energy meter concept
 
Method Summary
 void capacityChanged(ResourceConstraints newCapacity, List<PhysicalMachine> affectedCapacity)
          manages the changes in size of the infrastructure (e.g.
 IaaSService getObserved()
          Allows to determine what is the
private static List<EnergyMeter> subMeterCreator(List<PhysicalMachine> machines)
          This function creates a list of PhysicalMachineMeters from a list of physical machines.
 
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.AggregatedEnergyMeter
getTotalConsumption, startMeter, stopMeter, tick
 
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter
getMeteringStarted, getMeteringStopped, increaseTotalConsumption, readjustMeter
 
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.Timed
calcTimeJump, compareTo, fire, getFireCount, getFrequency, getNextEvent, getNextFire, isSubscribed, jumpTime, nextEventDistance, resetTimed, setBackPreference, simulateUntil, simulateUntilLastEvent, skipEventsTill, subscribe, toString, unsubscribe, updateFrequency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

observed

private final IaaSService observed
The IaaSService to be observed with this meter


oldCapacity

private ResourceConstraints oldCapacity
record of the past capacity on the observed IaaSservice (used to determine in which direction did its capacity change).

Constructor Detail

IaaSEnergyMeter

public IaaSEnergyMeter(IaaSService iaas)
Allows the construction of a new metering object building on top of the generic aggregated energy meter concept

Parameters:
iaas - the IaaS to be monitored energywise
Method Detail

subMeterCreator

private static List<EnergyMeter> subMeterCreator(List<PhysicalMachine> machines)
This function creates a list of PhysicalMachineMeters from a list of physical machines.

Parameters:
machines - the list of machines from which the meter set must be crearted
Returns:
the list of meters

capacityChanged

public void capacityChanged(ResourceConstraints newCapacity,
                            List<PhysicalMachine> affectedCapacity)
manages the changes in size of the infrastructure (e.g. PM additions or removals) this is important to support dynamic IaaS systems where the metering results are still properly recorded

Specified by:
capacityChanged in interface VMManager.CapacityChangeEvent<PhysicalMachine>
Parameters:
newCapacity - the size of the new capacity in terms of physical resources
affectedCapacity - the list of those objects (representing the computing capacity of the particular VMManager) that were added/removed during the change

getObserved

public IaaSService getObserved()
Allows to determine what is the

Returns:
the observed IaaS system


Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.