brooklyn.enricher
[Java] Class TimeFractionDeltaEnricher
java.lang.Object
brooklyn.policy.basic.AbstractEntityAdjunct
brooklyn.enricher.basic.AbstractEnricher
brooklyn.enricher.basic.AbstractTypeTransformingEnricher
brooklyn.enricher.TimeFractionDeltaEnricher
public class TimeFractionDeltaEnricher
extends AbstractTypeTransformingEnricher
Converts an absolute measure of time into a fraction of time, based on the delta between consecutive values
and the elapsed time between those values.
For example, if the values are for ProcessCpuTime (i.e. microseconds of CPU time for the given process), then
this would convert it into a fraction (i.e. 100th of the percentage): (newVal-prevVal)/(newTimestamp/prevTimestamp).
It also configured with the time units for the values.
Methods inherited from class AbstractEntityAdjunct
|
check, destroy, getAllSubscriptions, getId, getManagementContext, getName, getSubscriptionTracker, isDestroyed, isRunning, setEntity, setId, setName, subscribe, subscribeToChildren, subscribeToMembers, unsubscribe, unsubscribe |
lastTimestamp
protected long lastTimestamp
-
lastValue
protected java.lang.Number lastValue
-
TimeFractionDeltaEnricher
public TimeFractionDeltaEnricher(Entity producer, Sensor source, Sensor target, java.util.concurrent.TimeUnit origUnits)
-
TimeFractionDeltaEnricher
public TimeFractionDeltaEnricher(Entity producer, Sensor source, Sensor target, long nanosPerOrigUnit)
-
onEvent
@Override
public void onEvent(SensorEvent event)
-
onEvent
public void onEvent(SensorEvent event, long eventTimestamp)
-
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.