|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.policy.basic.AbstractEntityAdjunct
brooklyn.enricher.basic.AbstractEnricher
brooklyn.enricher.basic.AbstractAggregatingEnricher
brooklyn.enricher.CustomAggregatingEnricher
public class CustomAggregatingEnricher extends AbstractAggregatingEnricher
Subscribes to events from producers with a sensor of type T, aggregates them with the provided closure and emits the result on the target sensor V.
Field Summary | |
---|---|
protected Function |
aggregator
|
Fields inherited from class AbstractAggregatingEnricher | |
---|---|
defaultValue, target, values |
Fields inherited from class AbstractEnricher | |
---|---|
leftoverProperties |
Fields inherited from class AbstractEntityAdjunct | |
---|---|
_subscriptionTracker, entity, id, name |
Constructor Summary | |
CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
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 |
|
CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator)
|
|
CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
|
|
CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, Function aggregator)
|
|
CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
@param flags |
|
CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
|
|
CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
|
|
CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
|
|
CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
|
|
CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
|
|
CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
|
|
CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, Function aggregator)
|
Method Summary | |
---|---|
java.lang.Object
|
getAggregate()
|
static CustomAggregatingEnricher
|
getAveragingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target)
|
static CustomAggregatingEnricher
|
getSummingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target)
|
static CustomAggregatingEnricher
|
newAveragingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target)
creates an enricher which averages over all sensors, counting ZERO for sensors which have not yet published anything; to have those sensors excluded, pass null as an additional argument (defaultValue) |
static CustomAggregatingEnricher
|
newAveragingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, N defaultValue)
defaultValue of null means that the sensor is excluded |
static CustomAggregatingEnricher
|
newAveragingEnricher(AttributeSensor source, AttributeSensor target)
|
static CustomAggregatingEnricher
|
newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultVal)
|
static CustomAggregatingEnricher
|
newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
|
static CustomAggregatingEnricher
|
newEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultVal)
|
static CustomAggregatingEnricher
|
newEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
|
static CustomAggregatingEnricher
|
newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultVal)
|
static CustomAggregatingEnricher
|
newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator)
|
static CustomAggregatingEnricher
|
newEnricher(AttributeSensor source, AttributeSensor target, Function aggregator, S defaultVal)
|
static CustomAggregatingEnricher
|
newEnricher(AttributeSensor source, AttributeSensor target, Function aggregator)
|
static CustomAggregatingEnricher
|
newSummingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target)
|
static CustomAggregatingEnricher
|
newSummingEnricher(AttributeSensor source, AttributeSensor target)
|
void
|
onUpdated()
|
Methods inherited from class AbstractAggregatingEnricher | |
---|---|
addProducer, copyOfValues, onEvent, onUpdated, removeProducer, setEntity |
Methods inherited from class AbstractEnricher | |
---|---|
configure |
Methods inherited from class AbstractEntityAdjunct | |
---|---|
check, destroy, getAllSubscriptions, getId, getManagementContext, getName, getSubscriptionTracker, isDestroyed, isRunning, setEntity, setId, setName, subscribe, subscribeToChildren, subscribeToMembers, unsubscribe, unsubscribe |
Field Detail |
---|
protected final Function aggregator
Constructor Detail |
---|
public CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
aggregator
- Aggregates a collection of values, to return a single value for the target sensordefaultValue
- Default value to populate the collection given to aggregator, defaults to null
public CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator)
public CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
public CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, Function aggregator)
@SuppressWarnings("unchecked") public CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
aggregator
- Should take a collection of values and return a single, aggregate value
public CustomAggregatingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
public CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
public CustomAggregatingEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
@SuppressWarnings("unchecked") public CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultValue)
@Deprecated public CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
@Deprecated public CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultValue)
@Deprecated public CustomAggregatingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target, Function aggregator)
Method Detail |
---|
public java.lang.Object getAggregate()
@Deprecated public static CustomAggregatingEnricher getAveragingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target)
@Deprecated public static CustomAggregatingEnricher getSummingEnricher(java.util.List producer, AttributeSensor source, AttributeSensor target)
public static CustomAggregatingEnricher newAveragingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target)
public static CustomAggregatingEnricher newAveragingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, N defaultValue)
public static CustomAggregatingEnricher newAveragingEnricher(AttributeSensor source, AttributeSensor target)
public static CustomAggregatingEnricher newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultVal)
public static CustomAggregatingEnricher newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
public static CustomAggregatingEnricher newEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultVal)
public static CustomAggregatingEnricher newEnricher(AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator)
public static CustomAggregatingEnricher newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultVal)
public static CustomAggregatingEnricher newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator)
public static CustomAggregatingEnricher newEnricher(AttributeSensor source, AttributeSensor target, Function aggregator, S defaultVal)
public static CustomAggregatingEnricher newEnricher(AttributeSensor source, AttributeSensor target, Function aggregator)
public static CustomAggregatingEnricher newSummingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target)
public static CustomAggregatingEnricher newSummingEnricher(AttributeSensor source, AttributeSensor target)
@Override public void onUpdated()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.