Class SimpleJobBuilder
java.lang.Object
org.springframework.batch.core.job.builder.JobBuilderHelper<SimpleJobBuilder>
org.springframework.batch.core.job.builder.SimpleJobBuilder
- Since:
- 2.2
- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
JobBuilderHelper.CommonJobProperties
-
Field Summary
Fields inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
logger
-
Constructor Summary
ConstructorDescriptionSimpleJobBuilder
(JobBuilderHelper<?> parent) Create a new builder initialized with any properties in the parent. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
next
(JobExecutionDecider decider) Continue with this decider if the previous step was successful.Continue or end a job with this step if the previous step was successful.Branch into a flow conditional on the outcome of the current step.split
(org.springframework.core.task.TaskExecutor executor) start
(JobExecutionDecider decider) Start with this decider.Start the job with this step.Methods inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
enhance, getJobRepository, getName, incrementer, isRestartable, listener, listener, meterRegistry, observationConvention, observationRegistry, preventRestart, repository, validator
-
Constructor Details
-
SimpleJobBuilder
Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.- Parameters:
parent
- the parent to use
-
-
Method Details
-
build
-
start
Start the job with this step.- Parameters:
step
- a step to start with- Returns:
- this for fluent chaining
-
on
Branch into a flow conditional on the outcome of the current step.- Parameters:
pattern
- a pattern for the exit status of the current step- Returns:
- a builder for fluent chaining
-
start
Start with this decider. Returns a flow builder and when the flow is ended a job builder will be returned to continue the job configuration if needed.- Parameters:
decider
- a decider to execute first- Returns:
- builder for fluent chaining
-
next
Continue with this decider if the previous step was successful. Returns a flow builder and when the flow is ended a job builder will be returned to continue the job configuration if needed.- Parameters:
decider
- a decider to execute next- Returns:
- builder for fluent chaining
-
next
Continue or end a job with this step if the previous step was successful.- Parameters:
step
- a step to execute next- Returns:
- this for fluent chaining
-
split
public FlowBuilder.SplitBuilder<FlowJobBuilder> split(org.springframework.core.task.TaskExecutor executor) - Parameters:
executor
- instance ofTaskExecutor
to be used.- Returns:
- builder for fluent chaining
-