public class SizeBasedAggregatorOperations extends SingleGroupAggregatorOperations
| Constructor and Description |
|---|
SizeBasedAggregatorOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregateBySize(SizeBasedAggregatorParameterGroup aggregatorParameters,
IncrementalAggregationRoute incrementalAggregationRoute,
AggregationCompleteRoute onAggregationCompleteRoute,
org.mule.runtime.extension.api.runtime.process.RouterCompletionCallback completionCallback)
Aggregates a new event and executes the routes and listeners if it corresponds.
|
@Alias(value="sizeBasedAggregator") @Throws(value=AggregatorErrorProvider.class) public void aggregateBySize(@ParameterGroup(name="Aggregator config") SizeBasedAggregatorParameterGroup aggregatorParameters, @ChainInputResolver(value=AggregationChainInputResolver.class) @ExecutionOccurrence(value=ONCE_OR_NONE) @Alias(value="incrementalAggregation") @Optional IncrementalAggregationRoute incrementalAggregationRoute, @ChainInputResolver(value=AggregationChainInputResolver.class) @ExecutionOccurrence(value=ONCE_OR_NONE) @Alias(value="aggregationComplete") AggregationCompleteRoute onAggregationCompleteRoute, org.mule.runtime.extension.api.runtime.process.RouterCompletionCallback completionCallback)
aggregatorParameters, 2 things will happen:
onAggregationCompleteRoute will be executed with the aggregated elementsincrementalAggregationRoute is not null, and the maxSize was not reached,
then it's chain will be executed with all aggregated events, including the last one.
The aggregator can also have a timeout defined. In that case, an scheduled task with that timeout as delay
will be registered for execution. The time will be computed from the time in which the first element arrives and
no extra tasks will be scheduled if there is another one waiting to be executed.
In the case of a timeout, the hooked listener will be executed only if it supports being called by timeout.aggregatorParameters - the parameters that define the aggregator behaviourincrementalAggregationRoute - the route executed for every new event, if presentonAggregationCompleteRoute - the route executed when the group is completecompletionCallback - router callbackCopyright © 2024 MuleSoft, Inc.. All rights reserved.