hu.mta.sztaki.lpds.cloud.simulator.energy
Class AggregatedEnergyMeter
java.lang.Object
hu.mta.sztaki.lpds.cloud.simulator.Timed
hu.mta.sztaki.lpds.cloud.simulator.energy.EnergyMeter
hu.mta.sztaki.lpds.cloud.simulator.energy.AggregatedEnergyMeter
- All Implemented Interfaces:
- Comparable<Timed>
- Direct Known Subclasses:
- IaaSEnergyMeter, PhysicalMachineEnergyMeter
public class AggregatedEnergyMeter
- extends EnergyMeter
Method Summary |
double |
getTotalConsumption()
Calculates the sum of total consumptions returned by each and every
supervised meter |
boolean |
startMeter(long interval,
boolean dropPriorReading)
Dispatches start meter calls to all supervised meters. |
void |
stopMeter()
Dispatches stop meter calls to all supervised meters |
void |
tick(long fires)
|
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 |
supervised
public final List<EnergyMeter> supervised
AggregatedEnergyMeter
public AggregatedEnergyMeter(List<EnergyMeter> toAggregate)
startMeter
public boolean startMeter(long interval,
boolean dropPriorReading)
- Dispatches start meter calls to all supervised meters. If even one of
them fails, it immediately terminates those meters that were started
before the failure.
- Overrides:
startMeter
in class EnergyMeter
- Parameters:
interval
- The meter refresh frequency.dropPriorReading
-
False: the totalConsumption values will accumulate from a
previous metering session True: the totalconsumption
values will start from 0 after the completion of this
function.
- Returns:
- False: if a metering session is already underway
- True: if the metering session was successfully initiated
stopMeter
public void stopMeter()
- Dispatches stop meter calls to all supervised meters
- Overrides:
stopMeter
in class EnergyMeter
getTotalConsumption
public double getTotalConsumption()
- Calculates the sum of total consumptions returned by each and every
supervised meter
- Overrides:
getTotalConsumption
in class EnergyMeter
- Returns:
tick
public void tick(long fires)
- Specified by:
tick
in class Timed
Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.