File tree 1 file changed +12
-0
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .springframework .batch .core .step .tasklet ;
17
17
18
+ import org .springframework .batch .core .StepExecution ;
18
19
import org .springframework .batch .core .launch .JobOperator ;
19
20
20
21
/**
28
29
* so the appropriate thread safety and visibility controls should be put in place.
29
30
*
30
31
* @author Will Schipp
32
+ * @author Hyunsang Han
31
33
* @since 3.0
32
34
*/
33
35
public interface StoppableTasklet extends Tasklet {
@@ -38,4 +40,14 @@ public interface StoppableTasklet extends Tasklet {
38
40
*/
39
41
void stop ();
40
42
43
+ /**
44
+ * Used to signal that the job should stop, providing access to the current
45
+ * {@link StepExecution} context.
46
+ *
47
+ * @param stepExecution the current {@link StepExecution} context in which the job
48
+ * is being executed
49
+ */
50
+ default void stop (StepExecution stepExecution ) {
51
+ stop ();
52
+ }
41
53
}
You can’t perform that action at this time.
0 commit comments