org.springframework.batch.core.configuration.support

## Class MapStepRegistry

- java.lang.Object
- - org.springframework.batch.core.configuration.support.MapStepRegistry

- All Implemented Interfaces:
    StepRegistry

      public class MapStepRegistry
      extends java.lang.Object
      implements StepRegistry

  Simple map-based implementation of `StepRegistry`. Access to the map is synchronized, guarded by an internal lock.
  Author:
    Sebastien Gerard, Stephane Nicoll

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapStepRegistry()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Step` | `getStep(java.lang.String jobName, java.lang.String stepName)` Returns the `Step` of the specified job based on its name.
    `void` | `register(java.lang.String jobName, java.util.Collection<Step> steps)` Registers all the step of the given job.
    `void` | `unregisterStepsFromJob(java.lang.String jobName)` Unregisters all the steps of the given job.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MapStepRegistry

          public MapStepRegistry()

  - ### Method Detail

    - #### register

          public void register(java.lang.String jobName,
                               java.util.Collection<Step> steps)
                        throws DuplicateJobException

      Description copied from interface: `StepRegistry`
      Registers all the step of the given job. If the job is already registered, the method `StepRegistry.unregisterStepsFromJob(String)` is called before registering the given steps.
      Specified by:
        `register` in interface `StepRegistry`
      Parameters:
        `jobName` - the give job name
        `steps` - the job steps
      Throws:
        `DuplicateJobException` - if a job with the same job name has already been registered.

    - #### unregisterStepsFromJob

          public void unregisterStepsFromJob(java.lang.String jobName)

      Description copied from interface: `StepRegistry`
      Unregisters all the steps of the given job. If the job is not registered, nothing happens.
      Specified by:
        `unregisterStepsFromJob` in interface `StepRegistry`
      Parameters:
        `jobName` - the given job name

    - #### getStep

          public Step getStep(java.lang.String jobName,
                              java.lang.String stepName)
                       throws NoSuchJobException

      Description copied from interface: `StepRegistry`
      Returns the `Step` of the specified job based on its name.
      Specified by:
        `getStep` in interface `StepRegistry`
      Parameters:
        `jobName` - the name of the job
        `stepName` - 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