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, AbstractEntityAdjunct.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
SUPPRESS_DUPLICATES
HIGHLIGHT_NAME_LAST_ACTION, HIGHLIGHT_NAME_LAST_CONFIRMATION, HIGHLIGHT_NAME_LAST_VIOLATION, HIGHLIGHT_NAME_TRIGGERS
NOOP
Constructor and Description |
---|
TimeWeightedDeltaEnricher() |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis)
Deprecated.
since 0.12.0; use
EnricherSpec |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis,
<any> postProcessor)
Deprecated.
since 0.12.0; use
EnricherSpec |
TimeWeightedDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
int unitMillis,
groovy.lang.Closure<java.lang.Double> postProcessor)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted; also use
EnricherSpec |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Number> |
getPerSecondDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target)
Deprecated.
since 0.12.0; use
EnricherSpec |
void |
init()
Called by framework (in new-style instances where spec was used) after configuring etc,
but before a reference to this instance is shared.
|
void |
onEvent(SensorEvent<T> event)
The
SensorEvent handler method. |
void |
onEvent(SensorEvent<T> event,
long eventTime) |
setEntity
getEnricherType, getRebindSupport, relations
config, configure, destroy, getAdjunctType, getConfig, getDisplayName, getEntity, getExecutionContext, getHighlights, getManagementContext, getUniqueTag, isDestroyed, isRunning, setDisplayName, setHighlights, subscriptions, tags, toString
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, rebind, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemId
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHighlights, getUniqueTag, isDestroyed, isRunning
getCatalogItemId, getCatalogItemIdSearchPath, getDisplayName, subscriptions, tags
config, getConfig
addSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
public TimeWeightedDeltaEnricher()
@Deprecated public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, int unitMillis)
EnricherSpec
@Deprecated public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, int unitMillis, groovy.lang.Closure<java.lang.Double> postProcessor)
EnricherSpec
@Deprecated public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, int unitMillis, <any> postProcessor)
EnricherSpec
@Deprecated public static <T extends java.lang.Number> TimeWeightedDeltaEnricher<T> getPerSecondDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target)
EnricherSpec
public void init()
AbstractBrooklynObject
To preserve backwards compatibility for if the instance is constructed directly, one can call the code below, but that means it will be called after references to this policy have been shared with other entities.
if (isLegacyConstruction()) {
init();
}
init
in class AbstractBrooklynObject
public void onEvent(SensorEvent<T> event)
SensorEventListener
SensorEvent
handler method.public void onEvent(SensorEvent<T> event, long eventTime)