public class TimeFractionDeltaEnricher<T extends java.lang.Number> extends AbstractTypeTransformingEnricher<T,java.lang.Double>
AbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternalSUPPRESS_DUPLICATESHIGHLIGHT_NAME_LAST_ACTION, HIGHLIGHT_NAME_LAST_CONFIRMATION, HIGHLIGHT_NAME_LAST_VIOLATION, HIGHLIGHT_NAME_TRIGGERSNOOP| Constructor and Description |
|---|
TimeFractionDeltaEnricher() |
TimeFractionDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
long nanosPerOrigUnit)
Deprecated.
since 0.12.0; use
EnricherSpec |
TimeFractionDeltaEnricher(Entity producer,
Sensor<T> source,
Sensor<java.lang.Double> target,
java.util.concurrent.TimeUnit origUnits)
Deprecated.
since 0.12.0; use
EnricherSpec |
| Modifier and Type | Method and Description |
|---|---|
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 eventTimestamp) |
void |
rebind()
Called by framework on rebind (in new-style instances):
after configuring, but
before the instance is managed, and
before adjuncts are attached to entities, and
before a reference to an object is shared.
|
setEntitygetEnricherType, getRebindSupport, relationsconfig, configure, destroy, getAdjunctType, getConfig, getDisplayName, getEntity, getExecutionContext, getHighlights, getManagementContext, getUniqueTag, isDestroyed, isRunning, setDisplayName, setHighlights, subscriptions, tags, toStringaddSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemIdequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHighlights, getUniqueTag, isDestroyed, isRunninggetCatalogItemId, getCatalogItemIdSearchPath, getDisplayName, subscriptions, tagsconfig, getConfigaddSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemIdpublic TimeFractionDeltaEnricher()
@Deprecated public TimeFractionDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, java.util.concurrent.TimeUnit origUnits)
EnricherSpec@Deprecated public TimeFractionDeltaEnricher(Entity producer, Sensor<T> source, Sensor<java.lang.Double> target, long nanosPerOrigUnit)
EnricherSpecpublic void init()
AbstractBrooklynObjectTo 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 AbstractBrooklynObjectpublic void rebind()
AbstractBrooklynObjectAbstractBrooklynObject.init() will not be called on rebind.
If you need to intercept behaviour after adjuncts are attached,
consider AbstractEntity.onManagementStarting()
(but probably worth raising a discussion on the mailing list!)
rebind in class AbstractBrooklynObjectpublic void onEvent(SensorEvent<T> event)
SensorEventListenerSensorEvent handler method.public void onEvent(SensorEvent<T> event, long eventTimestamp)