This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 35b502e7cd26a2afe220f5adc9b06743feaae712 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Mon Mar 14 18:45:14 2022 +0100 CAMEL-17762: improved documentation for the resumable set --- .../src/main/java/org/apache/camel/ResumableSet.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/ResumableSet.java b/core/camel-api/src/main/java/org/apache/camel/ResumableSet.java index 4f82216..898c997 100644 --- a/core/camel-api/src/main/java/org/apache/camel/ResumableSet.java +++ b/core/camel-api/src/main/java/org/apache/camel/ResumableSet.java @@ -21,14 +21,21 @@ import java.lang.reflect.Array; import java.util.Arrays; import java.util.function.Predicate; +/** + * An interface that represents a set of resumables (i.e.: files in a directory, rows in a database, etc) + * + * @param <T> the indivudal type of each member of the set + */ public interface ResumableSet<T> { /** * Iterates over the set of input checking if they should be resumed or not. * - * @param input - * @param resumableCheck - * @return + * @param input the input array to check for resumables + * @param resumableCheck a checker method that returns true if a single entry of the input should be resumed or + * false otherwise. For instance: given a set A, B and C, where B has already been processed, + * then a test for A and C returns false, whereas a test for B returns true. + * @return a new array containing the elements that still need to be processed */ default T[] resumeEach(T[] input, Predicate<T> resumableCheck) { @SuppressWarnings("unchecked") @@ -53,7 +60,8 @@ public interface ResumableSet<T> { * Iterates over the set of input checking if they should be resumed or not * * @param resumableCheck a checker method that returns true if a single entry of the input should be resumed or - * false otherwise + * false otherwise. For instance: given a set A, B and C, where B has already been processed, + * then a test for A and C returns false, whereas a test for B returns true. */ void resumeEach(Predicate<T> resumableCheck);