Class MapStepRegistry
java.lang.Object
org.springframework.batch.core.configuration.support.MapStepRegistry
- All Implemented Interfaces:
StepRegistry
Simple map-based implementation of
StepRegistry
. Access to the map is
synchronized and guarded by an internal lock.- Author:
- Sebastien Gerard, Stephane Nicoll
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns theStep
of the specified job based on its name.void
register
(String jobName, Collection<Step> steps) Registers all the step instances of the given job.void
unregisterStepsFromJob
(String jobName) Unregisters all the steps instances of the given job.
-
Constructor Details
-
MapStepRegistry
public MapStepRegistry()
-
-
Method Details
-
register
Description copied from interface:StepRegistry
Registers all the step instances of the given job. If the job is already registered, the methodStepRegistry.unregisterStepsFromJob(String)
is called before registering the given steps.- Specified by:
register
in interfaceStepRegistry
- Parameters:
jobName
- the give job namesteps
- the job steps- Throws:
DuplicateJobException
- if a job with the same job name has already been registered.
-
unregisterStepsFromJob
Description copied from interface:StepRegistry
Unregisters all the steps instances of the given job. If the job is not registered, nothing happens.- Specified by:
unregisterStepsFromJob
in interfaceStepRegistry
- Parameters:
jobName
- the given job name
-
getStep
Description copied from interface:StepRegistry
Returns theStep
of the specified job based on its name.- Specified by:
getStep
in interfaceStepRegistry
- Parameters:
jobName
- the name of the jobstepName
- the name of the step to retrieve- Returns:
- the step with the given name belonging to the mentioned job
- Throws:
NoSuchJobException
- no such job with that name exists
-