This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new c332712  camel-core - Java DSL to specify completion size/timeout in 
aggregation via a string value
c332712 is described below

commit c3327128438b06c1490db4b2660fc1e6e8d1d89a
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jun 24 14:13:36 2020 +0200

    camel-core - Java DSL to specify completion size/timeout in aggregation via 
a string value
---
 .../apache/camel/model/AggregateDefinition.java    | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git 
a/core/camel-core-engine/src/main/java/org/apache/camel/model/AggregateDefinition.java
 
b/core/camel-core-engine/src/main/java/org/apache/camel/model/AggregateDefinition.java
index 966586e..ecce8d3 100644
--- 
a/core/camel-core-engine/src/main/java/org/apache/camel/model/AggregateDefinition.java
+++ 
b/core/camel-core-engine/src/main/java/org/apache/camel/model/AggregateDefinition.java
@@ -731,6 +731,44 @@ public class AggregateDefinition extends 
OutputDefinition<AggregateDefinition> i
     }
 
     /**
+     * A repeating period in millis by which the aggregator will complete all
+     * current aggregated exchanges. Camel has a background task which is
+     * triggered every period. You cannot use this option together with
+     * completionTimeout, only one of them can be used.
+     *
+     * @param completionInterval the interval in millis, must be a positive
+     *            value
+     * @return the builder
+     */
+    public AggregateDefinition completionInterval(String completionInterval) {
+        setCompletionInterval(completionInterval);
+        return this;
+    }
+
+    /**
+     * Time in millis that an aggregated exchange should be inactive before its
+     * complete (timeout). This option can be set as either a fixed value or
+     * using an Expression which allows you to evaluate a timeout dynamically -
+     * will use Long as result. If both are set Camel will fallback to use the
+     * fixed value if the Expression result was null or 0. You cannot use this
+     * option together with completionInterval, only one of the two can be 
used.
+     * <p/>
+     * By default the timeout checker runs every second, you can use the
+     * completionTimeoutCheckerInterval option to configure how frequently to
+     * run the checker. The timeout is an approximation and there is no
+     * guarantee that the a timeout is triggered exactly after the timeout
+     * value. It is not recommended to use very low timeout values or checker
+     * intervals.
+     *
+     * @param completionTimeout the timeout in millis, must be a positive value
+     * @return the builder
+     */
+    public AggregateDefinition completionTimeout(String completionTimeout) {
+        setCompletionTimeout(completionTimeout);
+        return this;
+    }
+
+    /**
      * Time in millis that an aggregated exchange should be inactive before its
      * complete (timeout). This option can be set as either a fixed value or
      * using an Expression which allows you to evaluate a timeout dynamically -

Reply via email to