Interface TaskSource<R>
- Type Parameters:
R- the type of the input used to create or schedule a task
public interface TaskSource<R>
Represents a source of tasks from which tasks can be fetched. When invoked by
PollingTaskExecutor, these methods are run within a @UnitOfWork so that any updates they make to
the database are visible to the resulting tasks.-
Method Summary
-
Method Details
-
nextInput
Returns the next available input, or an empty Optional if no tasks are available.- Returns:
- an Optional containing the next input, or empty if none is available
-
nextInputs
Returns a list of available inputs to be processed in order. Defaults to a singleton list fromnextInput(), or an empty list if none is available. Implementations may override this method to return multiple inputs at once.- Returns:
- a list of inputs to process, possibly empty
-