org.springframework.batch.core.repository.dao

## Class MapJobExecutionDao

- java.lang.Object
- - org.springframework.batch.core.repository.dao.MapJobExecutionDao

- All Implemented Interfaces:
    JobExecutionDao

  Deprecated.
  as of v4.3 in favor of using the `JdbcJobExecutionDao` with an in-memory database. Scheduled for removal in v5.0.

      @Deprecated
      public class MapJobExecutionDao
      extends java.lang.Object
      implements JobExecutionDao

  In-memory implementation of `JobExecutionDao`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapJobExecutionDao()` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Deprecated.
    `java.util.List<JobExecution>` | `findJobExecutions(JobInstance jobInstance)` Deprecated. Return all `JobExecution`s for given `JobInstance`, sorted backwards by creation order (so the first element is the most recent).
    `java.util.Set<JobExecution>` | `findRunningJobExecutions(java.lang.String jobName)` Deprecated.
    `JobExecution` | `getJobExecution(java.lang.Long executionId)` Deprecated.
    `JobExecution` | `getLastJobExecution(JobInstance jobInstance)` Deprecated. Find the last `JobExecution` to have been created for a given `JobInstance`.
    `void` | `saveJobExecution(JobExecution jobExecution)` Deprecated. Save a new JobExecution.
    `void` | `synchronizeStatus(JobExecution jobExecution)` Deprecated. Because it may be possible that the status of a JobExecution is updated while running, the following method will synchronize only the status and version fields.
    `void` | `updateJobExecution(JobExecution jobExecution)` Deprecated. Update and existing JobExecution.

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

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

- - ### Constructor Detail

    - #### MapJobExecutionDao

          public MapJobExecutionDao()

      Deprecated.

  - ### Method Detail

    - #### clear

          public void clear()

      Deprecated.

    - #### saveJobExecution

          public void saveJobExecution(JobExecution jobExecution)

      Deprecated.
      Description copied from interface: `JobExecutionDao`
      Save a new JobExecution. Preconditions: jobInstance the jobExecution belongs to must have a jobInstanceId.
      Specified by:
        `saveJobExecution` in interface `JobExecutionDao`
      Parameters:
        `jobExecution` - `JobExecution` instance to be saved.

    - #### findJobExecutions

          public java.util.List<JobExecution> findJobExecutions(JobInstance jobInstance)

      Deprecated.
      Description copied from interface: `JobExecutionDao`
      Return all `JobExecution`s for given `JobInstance`, sorted backwards by creation order (so the first element is the most recent).
      Specified by:
        `findJobExecutions` in interface `JobExecutionDao`
      Parameters:
        `jobInstance` - parent `JobInstance` of the `JobExecution`s to find.
      Returns:
        `List` containing JobExecutions for the jobInstance.

    - #### updateJobExecution

          public void updateJobExecution(JobExecution jobExecution)

      Deprecated.
      Description copied from interface: `JobExecutionDao`
      Update and existing JobExecution. Preconditions: jobExecution must have an Id (which can be obtained by the save method) and a jobInstanceId.
      Specified by:
        `updateJobExecution` in interface `JobExecutionDao`
      Parameters:
        `jobExecution` - `JobExecution` instance to be updated.

    - #### getLastJobExecution

          @Nullable
          public JobExecution getLastJobExecution(@Nullable
                                                            JobInstance jobInstance)

      Deprecated.
      Description copied from interface: `JobExecutionDao`
      Find the last `JobExecution` to have been created for a given `JobInstance`.
      Specified by:
        `getLastJobExecution` in interface `JobExecutionDao`
      Parameters:
        `jobInstance` - the `JobInstance`
      Returns:
        the last `JobExecution` to execute for this instance or `null` if no job execution is found for the given job instance.

    - #### findRunningJobExecutions

          public java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)

      Deprecated.
      Specified by:
        `findRunningJobExecutions` in interface `JobExecutionDao`
      Parameters:
        `jobName` - `String` containing the name of the job.
      Returns:
        all `JobExecution` that are still running (or indeterminate state), i.e. having null end date, for the specified job name.

    - #### getJobExecution

          @Nullable
          public JobExecution getJobExecution(java.lang.Long executionId)

      Deprecated.
      Specified by:
        `getJobExecution` in interface `JobExecutionDao`
      Parameters:
        `executionId` - `Long` containing the id of the execution.
      Returns:
        the `JobExecution` for given identifier.

    - #### synchronizeStatus

          public void synchronizeStatus(JobExecution jobExecution)

      Deprecated.
      Description copied from interface: `JobExecutionDao`
      Because it may be possible that the status of a JobExecution is updated while running, the following method will synchronize only the status and version fields.
      Specified by:
        `synchronizeStatus` in interface `JobExecutionDao`
      Parameters:
        `jobExecution` - to be updated.