Interface Tasklet
- All Known Subinterfaces:
StoppableTasklet
- All Known Implementing Classes:
CallableTaskletAdapter,ChunkOrientedTasklet,MethodInvokingTaskletAdapter,SystemCommandTasklet
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy for processing in a step.
- Author:
- Dave Syer, Mahmoud Ben Hassine, Taeik Lim
-
Method Summary
Modifier and TypeMethodDescriptionexecute(StepContribution contribution, ChunkContext chunkContext) Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction.
-
Method Details
-
execute
@Nullable RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction. Implementations returnRepeatStatus.FINISHEDif finished. If not they returnRepeatStatus.CONTINUABLE. On failure throws an exception.- Parameters:
contribution- mutable state to be passed back to update the current step executionchunkContext- attributes shared between invocations but not between restarts- Returns:
- an
RepeatStatusindicating whether processing is continuable. Returningnullis interpreted asRepeatStatus.FINISHED - Throws:
Exception- thrown if error occurs during execution.
-