@Beta public class TimeWeightedDeltaEnricher<T extends java.lang.Number> extends AbstractTypeTransformingEnricher<T,java.lang.Double>
NB for time (e.g. "total milliseconds consumed") use TimeFractionDeltaEnricher
See also YamlTimeWeightedDeltaEnricher
designed for use from YAML.
TODO this may end up being deprecated in favour of near-duplicate code in YAML-friendly YamlTimeWeightedDeltaEnricher
,
marking as @Beta in 0.7.0 timeframe
AbstractEntityAdjunct.AdjunctTagSupport
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
SUPPRESS_DUPLICATES
NOOP
Constructor and Description |
---|
TimeWeightedDeltaEnricher() |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis) |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis,
groovy.lang.Closure<java.lang.Double> postProcessor) |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis,
com.google.common.base.Function<java.lang.Double,java.lang.Double> postProcessor) |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
getPerSecondDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target) |
void |
onEvent(SensorEvent<T> event)
The
SensorEvent handler method. |
void |
onEvent(SensorEvent<T> event,
long eventTime) |
setEntity
getEnricherType, getRebindSupport
config, configure, destroy, getAllConfig, getConfig, getConfigMap, getDisplayName, getName, getUniqueTag, isDestroyed, isRunning, setConfig, setDisplayName, setName, tags, toString
getCatalogItemId, getId, getManagementContext, getTagSupport, init, rebind, setCatalogItemId, setManagementContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllConfig, getConfig, getId, getName, setConfig
getUniqueTag, isDestroyed, isRunning
getCatalogItemId, getDisplayName, getTagSupport, tags
config
setCatalogItemId
public TimeWeightedDeltaEnricher()
public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, int unitMillis)
public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, int unitMillis, groovy.lang.Closure<java.lang.Double> postProcessor)
public static <T extends java.lang.Number> TimeWeightedDeltaEnricher<T> getPerSecondDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target)
public void onEvent(SensorEvent<T> event)
SensorEventListener
SensorEvent
handler method.public void onEvent(SensorEvent<T> event, long eventTime)