public interface PreCompletionAwareAggregationStrategy extends AggregationStrategy
AggregationStrategy which enables the aggregator to run
in pre-completion mode. This allows the preComplete(org.apache.camel.Exchange, org.apache.camel.Exchange) method
to control the completion. Only completion timeout or interval can also be used; any other completion configuration
is not in use.
Using this strategy supports the use-case, where an incoming Exchange has information that may trigger the completion
of the current group. And then use the new incoming Exchange to start a new group thereafter from scratch.| Modifier and Type | Method and Description |
|---|---|
boolean |
preComplete(Exchange oldExchange,
Exchange newExchange)
Determines if the aggregation should complete the current group, and start a new group, or the aggregation
should continue using the current group.
|
aggregateboolean preComplete(Exchange oldExchange, Exchange newExchange)
oldExchange - the oldest exchange (is null on first aggregation as we only have the new exchange)newExchange - the newest exchange (can be null if there was no data possible to acquire)Apache Camel