Package org.apache.camel
Interface ResumableSet<T>
-
- Type Parameters:
T
- the indivudal type of each member of the set
public interface ResumableSet<T>
An interface that represents a set of resumables (i.e.: files in a directory, rows in a database, etc)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
hasResumables()
Whether there are resumable entries to processT[]
resumed()
Gets the input that should be resumedvoid
resumeEach(Predicate<T> resumableCheck)
Iterates over the set of input checking if they should be resumed or notdefault T[]
resumeEach(T[] input, Predicate<T> resumableCheck)
Iterates over the set of input checking if they should be resumed or not.
-
-
-
Method Detail
-
resumeEach
default T[] resumeEach(T[] input, Predicate<T> resumableCheck)
Iterates over the set of input checking if they should be resumed or not.- Parameters:
input
- the input array to check for resumablesresumableCheck
- 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 true, whereas a test for B returns false.- Returns:
- a new array containing the elements that still need to be processed
-
resumeEach
void resumeEach(Predicate<T> resumableCheck)
Iterates over the set of input checking if they should be resumed or not- Parameters:
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 true, whereas a test for B returns false.
-
resumed
T[] resumed()
Gets the input that should be resumed- Returns:
- an array with the input that should be resumed
-
hasResumables
boolean hasResumables()
Whether there are resumable entries to process- Returns:
- true if there are resumable entries or false otherwise
-
-