org.springframework.batch.core

## Class DefaultJobKeyGenerator

- java.lang.Object
- - org.springframework.batch.core.DefaultJobKeyGenerator

- All Implemented Interfaces:
    JobKeyGenerator<JobParameters>

      public class DefaultJobKeyGenerator
      extends java.lang.Object
      implements JobKeyGenerator<JobParameters>

  Default implementation of the `JobKeyGenerator` interface. This implementation provides a single hash value based on the JobParameters passed in. Only identifying parameters (per `JobParameter.isIdentifying()`) are used in the calculation of the key.
  Since:
    2.2
  Author:
    Michael Minella

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultJobKeyGenerator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `generateKey(JobParameters source)` Generates the job key to be used based on the `JobParameters` instance provided.

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

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

- - ### Constructor Detail

    - #### DefaultJobKeyGenerator

          public DefaultJobKeyGenerator()

  - ### Method Detail

    - #### generateKey

          public java.lang.String generateKey(JobParameters source)

      Generates the job key to be used based on the `JobParameters` instance provided.
      Specified by:
        `generateKey` in interface `JobKeyGenerator<JobParameters>`
      Parameters:
        `source` - Source information used to generate the key
      Returns:
        a unique string identifying the job based on the information supplied