Class StepBuilderHelper<B extends StepBuilderHelper<B>>
java.lang.Object
org.springframework.batch.core.step.builder.StepBuilderHelper<B>
- Direct Known Subclasses:
AbstractTaskletStepBuilder
,FlowStepBuilder
,JobStepBuilder
,PartitionStepBuilder
,StepBuilder
A base class and utility for other step builders providing access to common properties
like job repository and listeners.
- Since:
- 2.2
- Author:
- Dave Syer, Michael Minella, Taeik Lim, Mahmoud Ben Hassine
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
protected final StepBuilderHelper.CommonStepProperties
-
Constructor Summary
ModifierConstructorDescriptionStepBuilderHelper
(String name) Deprecated, for removal: This API element is subject to removal in a future version.StepBuilderHelper
(String name, JobRepository jobRepository) Create a newStepBuilderHelper
.protected
StepBuilderHelper
(StepBuilderHelper<?> parent) Create a new builder initialized with any properties in the parent. -
Method Summary
Modifier and TypeMethodDescriptionallowStartIfComplete
(boolean allowStartIfComplete) protected void
enhance
(AbstractStep step) protected JobRepository
protected String
getName()
protected boolean
Registers objects using the annotation based listener configuration.listener
(StepExecutionListener listener) meterRegistry
(io.micrometer.core.instrument.MeterRegistry meterRegistry) observationConvention
(BatchStepObservationConvention observationConvention) Sets the step observation convention.observationRegistry
(io.micrometer.observation.ObservationRegistry observationRegistry) repository
(JobRepository jobRepository) Deprecated, for removal: This API element is subject to removal in a future version.protected abstract B
self()
startLimit
(int startLimit)
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger -
properties
-
-
Constructor Details
-
StepBuilderHelper
Deprecated, for removal: This API element is subject to removal in a future version.Create a newStepBuilderHelper
.- Parameters:
name
- the step name
-
StepBuilderHelper
Create a newStepBuilderHelper
.- Parameters:
name
- the step namejobRepository
- the job repository- Since:
- 5.1
-
StepBuilderHelper
Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.- Parameters:
parent
- a parent helper containing common step properties
-
-
Method Details
-
repository
Deprecated, for removal: This API element is subject to removal in a future version.Set the job repository- Parameters:
jobRepository
- the repository to set- Returns:
- this to enable fluent chaining
-
observationConvention
Sets the step observation convention.- Parameters:
observationConvention
- the step observation convention (optional)- Returns:
- this to enable fluent chaining
- Since:
- 5.1
-
observationRegistry
-
meterRegistry
-
startLimit
-
listener
Registers objects using the annotation based listener configuration.- Parameters:
listener
- the object that has a method configured with listener annotation- Returns:
- this for fluent chaining
-
listener
-
allowStartIfComplete
-
self
-
getName
-
getJobRepository
-
isAllowStartIfComplete
protected boolean isAllowStartIfComplete() -
enhance
-
StepBuilderHelper(String, JobRepository)