S - source sensor typeTKey - key type in target sensor mapTVal - value type in target sensor mappublic class UpdatingMap<S,TKey,TVal> extends AbstractEnricher implements SensorEventListener<S>
TARGET_SENSOR) 
 based on the value of another sensor (SOURCE_SENSOR.
 
 The key used defaults to the name of the source sensor but can be specified with KEY_IN_TARGET_SENSOR.
 The value placed in the map is the result of applying the function in COMPUTING to the sensor value,
 with default behaviour being to remove an entry if null is returned
 but this can be overriden by setting REMOVING_IF_RESULT_IS_NULL false.
 Entities.REMOVE and Entities.UNCHANGED are also respeced as return values for the computation
 (ignoring generics).
 Unlike most other enrichers, this defaults to AbstractEnricher.SUPPRESS_DUPLICATES being true
AbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal| Modifier and Type | Field and Description | 
|---|---|
| static ConfigKey< | COMPUTING | 
| static ConfigKey<?> | KEY_IN_TARGET_SENSOR | 
| static ConfigKey<java.lang.Boolean> | REMOVING_IF_RESULT_IS_NULL | 
| static ConfigKey<Sensor<?>> | SOURCE_SENSOR | 
| static ConfigKey<Sensor<?>> | TARGET_SENSOR | 
SUPPRESS_DUPLICATESNOOP| Constructor and Description | 
|---|
| UpdatingMap() | 
| UpdatingMap(java.util.Map<java.lang.Object,java.lang.Object> flags) | 
| 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<S> event)The  SensorEventhandler method. | 
| void | setEntity(EntityLocal entity) | 
getEnricherType, getRebindSupport, relationsconfig, configure, destroy, getAdjunctType, getConfig, getConfigMap, getDisplayName, getUniqueTag, isDestroyed, isRunning, setConfig, setDisplayName, subscribe, subscribeToChildren, subscribeToMembers, subscriptions, tags, toString, unsubscribe, unsubscribegetCatalogItemId, getId, getManagementContext, rebind, setCatalogItemId, setManagementContextequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUniqueTag, isDestroyed, isRunninggetCatalogItemId, getDisplayName, subscriptions, tagsconfig, getConfig, setConfigsetCatalogItemIdpublic static final ConfigKey<?> KEY_IN_TARGET_SENSOR
public static final ConfigKey<> COMPUTING 
public static final ConfigKey<java.lang.Boolean> REMOVING_IF_RESULT_IS_NULL
public UpdatingMap()
public UpdatingMap(java.util.Map<java.lang.Object,java.lang.Object> flags)
public 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 setEntity(EntityLocal entity)
setEntity in class AbstractEnricherpublic void onEvent(SensorEvent<S> event)
SensorEventListenerSensorEvent handler method.onEvent in interface SensorEventListener<S>