T
- Enrichers.builder()
@Deprecated public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher<S,T> implements SensorEventListener<S>
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
NOOP
Constructor and Description |
---|
CustomAggregatingEnricher(AttributeSensor<? extends S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
Deprecated.
|
CustomAggregatingEnricher(AttributeSensor<? extends S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator,
S defaultValue)
Deprecated.
|
CustomAggregatingEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
CustomAggregatingEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator,
S defaultValueForUnreportedSensors)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<? extends S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<? extends S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator,
S defaultValueForUnreportedSensors)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<? extends S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
Deprecated.
|
CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<? extends S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator,
S defaultIniitalValueForUnreportedSensors)
Deprecated.
The valid keys for the flags are:
- producers: a collection of entities to be aggregated
- allMembers: indicates that should track members of the entity that the aggregator is associated with,
to aggregate across all those members.
|
Modifier and Type | Method and Description |
---|---|
T |
getAggregate()
Deprecated.
|
static <N extends java.lang.Number> |
newAveragingEnricher(AttributeSensor<N> source,
AttributeSensor<java.lang.Double> target)
Deprecated.
|
static <N extends java.lang.Number> |
newAveragingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<? extends N> source,
AttributeSensor<java.lang.Double> target,
N defaultValueForUnreportedSensors,
java.lang.Double valueToReportIfNoSensors)
Deprecated.
since 0.7.0; use
Enrichers.builder() |
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator,
S defaultVal)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
Deprecated.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(AttributeSensor<S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator,
S defaultVal)
Deprecated.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator)
Deprecated.
since 0.11.0; explicit groovy utilities/support will be deleted.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<S> source,
AttributeSensor<T> target,
groovy.lang.Closure<?> aggregator,
S defaultVal)
Deprecated.
since 0.7.0; use
Enrichers.builder() |
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
Deprecated.
|
static <S,T> CustomAggregatingEnricher<S,T> |
newEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<S> source,
AttributeSensor<T> target,
com.google.common.base.Function<java.util.Collection<S>,T> aggregator,
S defaultVal)
Deprecated.
since 0.7.0; use
Enrichers.builder() |
static <N extends java.lang.Number> |
newSummingEnricher(AttributeSensor<N> source,
AttributeSensor<N> target)
Deprecated.
|
static <N extends java.lang.Number,T extends java.lang.Number> |
newSummingEnricher(java.util.Map<java.lang.String,?> flags,
AttributeSensor<N> source,
AttributeSensor<T> target,
N defaultValueForUnreportedSensors,
T valueToReportIfNoSensors)
Deprecated.
since 0.7.0; use
Enrichers.builder() |
void |
onUpdated()
Deprecated.
Called whenever the values for the set of producers changes (e.g.
|
addProducer, onEvent, removeProducer, setEntity
getEnricherType, getRebindSupport, relations
config, configure, destroy, getAdjunctType, getConfig, getDisplayName, getEntity, getUniqueTag, isDestroyed, isRunning, setConfig, setDisplayName, subscribe, subscribeToChildren, subscribeToMembers, subscriptions, tags, toString, unsubscribe, unsubscribe
getCatalogItemId, getId, getManagementContext, init, rebind, setCatalogItemId, setManagementContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
onEvent
getUniqueTag, isDestroyed, isRunning
getCatalogItemId, getDisplayName, subscriptions, tags
config, getConfig, setConfig
setCatalogItemId
public CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<? extends S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator, S defaultIniitalValueForUnreportedSensors)
Closure
is deprecated)flags
- source
- target
- aggregator
- Aggregates a collection of values, to return a single value for the target sensordefaultIniitalValueForUnreportedSensors
- Default value to populate the collection given to aggregator,
where sensors are null or not present initially, defaults to null (note however that subsequent null reports will put an explicit null)public CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<? extends S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
public CustomAggregatingEnricher(AttributeSensor<? extends S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator, S defaultValue)
public CustomAggregatingEnricher(AttributeSensor<? extends S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
@Deprecated public CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<? extends S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator, S defaultValueForUnreportedSensors)
flags
- source
- target
- aggregator
- Should take a collection of values and return a single, aggregate valuedefaultValueForUnreportedSensors
- CustomAggregatingEnricher(Map, AttributeSensor, AttributeSensor, Function, Object)
@Deprecated public CustomAggregatingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<? extends S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator)
@Deprecated public CustomAggregatingEnricher(AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator, S defaultValueForUnreportedSensors)
@Deprecated public CustomAggregatingEnricher(AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator)
public void onUpdated()
AbstractAggregatingEnricher
public T getAggregate()
@Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator, S defaultVal)
Enrichers.builder()
Enrichers.Builder builder = Enrichers.builder()
.aggregating(source)
.publishing(target)
.computing(GroovyJavaMethods.<Collection<S>, T>functionFromClosure((Closure<T>)aggregator))
.defaultValueForUnreportedSensors(defaultValueForUnreportedSensors);
if (Boolean.TRUE.equals(allMembers)) builder.fromMembers();
if (filter != null) builder.entityFilter(filter);
if (hardCodedProducers != null) builder.fromHardcodedProducers(hardCodedProducers);
addEnricher(builder.build());
@Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator)
@Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator, S defaultVal)
@Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(AttributeSensor<S> source, AttributeSensor<T> target, groovy.lang.Closure<?> aggregator)
@Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator, S defaultVal)
Enrichers.builder()
Enrichers.Builder builder = Enrichers.builder()
.aggregating(source)
.publishing(target)
.computing(aggregator)
.defaultValueForUnreportedSensors(defaultVal);
if (Boolean.TRUE.equals(allMembers)) builder.fromMembers();
if (filter != null) builder.entityFilter(filter);
if (hardCodedProducers != null) builder.fromHardcodedProducers(hardCodedProducers);
addEnricher(builder.build());
public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(AttributeSensor<S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator, S defaultVal)
public static <S,T> CustomAggregatingEnricher<S,T> newEnricher(AttributeSensor<S> source, AttributeSensor<T> target, com.google.common.base.Function<java.util.Collection<S>,T> aggregator)
@Deprecated public static <N extends java.lang.Number,T extends java.lang.Number> CustomAggregatingEnricher<N,T> newSummingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<N> source, AttributeSensor<T> target, N defaultValueForUnreportedSensors, T valueToReportIfNoSensors)
Enrichers.builder()
Enrichers.Builder builder = Enrichers.builder()
.aggregating(source)
.publishing(target)
.computingSum()
.defaultValueForUnreportedSensors(defaultValueForUnreportedSensors)
.valueToReportIfNoSensors(valueToReportIfNoSensors);
if (Boolean.TRUE.equals(allMembers)) builder.fromMembers();
if (filter != null) builder.entityFilter(filter);
if (hardCodedProducers != null) builder.fromHardcodedProducers(hardCodedProducers);
addEnricher(builder.build());
public static <N extends java.lang.Number> CustomAggregatingEnricher<N,N> newSummingEnricher(AttributeSensor<N> source, AttributeSensor<N> target)
#newSummingEnricher(Map, AttributeSensor, AttributeSensor, Number, Number)}
@Deprecated public static <N extends java.lang.Number> CustomAggregatingEnricher<N,java.lang.Double> newAveragingEnricher(java.util.Map<java.lang.String,?> flags, AttributeSensor<? extends N> source, AttributeSensor<java.lang.Double> target, N defaultValueForUnreportedSensors, java.lang.Double valueToReportIfNoSensors)
Enrichers.builder()
Enrichers.Builder builder = Enrichers.builder()
.aggregating(source)
.publishing(target)
.computingAverage()
.defaultValueForUnreportedSensors(defaultValueForUnreportedSensors)
.valueToReportIfNoSensors(valueToReportIfNoSensors);
if (Boolean.TRUE.equals(allMembers)) builder.fromMembers();
if (filter != null) builder.entityFilter(filter);
if (hardCodedProducers != null) builder.fromHardcodedProducers(hardCodedProducers);
addEnricher(builder.build());
public static <N extends java.lang.Number> CustomAggregatingEnricher<N,java.lang.Double> newAveragingEnricher(AttributeSensor<N> source, AttributeSensor<java.lang.Double> target)