You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/09 10:06:01 UTC
[1/2] camel git commit: Improved docs
Repository: camel
Updated Branches:
refs/heads/master 8d5624774 -> 8b58e688b
Improved docs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8b58e688
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8b58e688
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8b58e688
Branch: refs/heads/master
Commit: 8b58e688bd8da03f84acec50890fb94a56830c37
Parents: 3456700
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Feb 9 11:05:39 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Feb 9 11:05:48 2017 +0100
----------------------------------------------------------------------
.../apache/camel/model/AggregateDefinition.java | 35 ++++++++++++--------
1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8b58e688/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java b/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
index 1c2a863..ec7d396 100644
--- a/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
@@ -723,10 +723,11 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
}
/**
- * Sets the completion size, which is the number of aggregated exchanges which would
- * cause the aggregate to consider the group as complete and send out the aggregated exchange.
+ * Number of messages aggregated before the aggregation is complete. This option can be set as either
+ * a fixed value or using an Expression which allows you to evaluate a size dynamically - will use Integer as result.
+ * If both are set Camel will fallback to use the fixed value if the Expression result was null or 0.
*
- * @param completionSize the completion size
+ * @param completionSize the completion size, must be a positive number
* @return builder
*/
public AggregateDefinition completionSize(int completionSize) {
@@ -735,8 +736,9 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
}
/**
- * Sets the completion size, which is the number of aggregated exchanges which would
- * cause the aggregate to consider the group as complete and send out the aggregated exchange.
+ * Number of messages aggregated before the aggregation is complete. This option can be set as either
+ * a fixed value or using an Expression which allows you to evaluate a size dynamically - will use Integer as result.
+ * If both are set Camel will fallback to use the fixed value if the Expression result was null or 0.
*
* @param completionSize the completion size as an {@link org.apache.camel.Expression} which is evaluated as a {@link Integer} type
* @return builder
@@ -747,10 +749,11 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
}
/**
- * Sets the completion interval, which would cause the aggregate to consider the group as complete
- * and send out the aggregated exchange.
+ * 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
+ * @param completionInterval the interval in millis, must be a positive value
* @return the builder
*/
public AggregateDefinition completionInterval(long completionInterval) {
@@ -759,10 +762,13 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
}
/**
- * Sets the completion timeout, which would cause the aggregate to consider the group as complete
- * and send out the aggregated exchange.
+ * 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.
*
- * @param completionTimeout the timeout in millis
+ * @param completionTimeout the timeout in millis, must be a positive value
* @return the builder
*/
public AggregateDefinition completionTimeout(long completionTimeout) {
@@ -771,8 +777,11 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
}
/**
- * Sets the completion timeout, which would cause the aggregate to consider the group as complete
- * and send out the aggregated exchange.
+ * 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.
*
* @param completionTimeout the timeout as an {@link Expression} which is evaluated as a {@link Long} type
* @return the builder
[2/2] camel git commit: Add javadoc
Posted by da...@apache.org.
Add javadoc
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3456700d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3456700d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3456700d
Branch: refs/heads/master
Commit: 3456700d217c4b5e1b0b90724852865a284b2372
Parents: 8d56247
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Feb 9 10:57:15 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Feb 9 11:05:48 2017 +0100
----------------------------------------------------------------------
.../main/java/org/apache/camel/util/FileUtil.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/3456700d/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
index fee4be4..07f64a8 100644
--- a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
+++ b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
@@ -522,6 +522,13 @@ public final class FileUtil {
return true;
}
+ /**
+ * Copies the file
+ *
+ * @param from the source file
+ * @param to the destination file
+ * @throws IOException If an I/O error occurs during copy operation
+ */
public static void copyFile(File from, File to) throws IOException {
FileChannel in = null;
FileChannel out = null;
@@ -543,6 +550,14 @@ public final class FileUtil {
}
}
+ /**
+ * Deletes the file.
+ * <p/>
+ * This implementation will attempt to delete the file up till three times with one second delay, which
+ * can mitigate problems on deleting files on some platforms such as Windows.
+ *
+ * @param file the file to delete
+ */
public static boolean deleteFile(File file) {
// do not try to delete non existing files
if (!file.exists()) {