Class MapExecutionContextDao
- java.lang.Object
- org.springframework.batch.core.repository.dao.MapExecutionContextDao
- All Implemented Interfaces:
ExecutionContextDao
public class MapExecutionContextDao extends java.lang.Object implements ExecutionContextDao
In-memory implementation ofExecutionContextDao
backed by maps.- Author:
- Robert Kasanicky, Dave Syer, David Turanski, Mahmoud Ben Hassine
Constructor Summary
Constructors Constructor Description MapExecutionContextDao()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
ExecutionContext
getExecutionContext(JobExecution jobExecution)
ExecutionContext
getExecutionContext(StepExecution stepExecution)
void
saveExecutionContext(JobExecution jobExecution)
Persist the execution context associated with the given jobExecution, persistent entry for the context should not exist yet.void
saveExecutionContext(StepExecution stepExecution)
Persist the execution context associated with the given stepExecution, persistent entry for the context should not exist yet.void
saveExecutionContexts(java.util.Collection<StepExecution> stepExecutions)
Persist the execution context associated with each stepExecution in a given collection, persistent entry for the context should not exist yet.void
updateExecutionContext(JobExecution jobExecution)
Persist the updates of execution context associated with the given jobExecution.void
updateExecutionContext(StepExecution stepExecution)
Persist the updates of execution context associated with the given stepExecution.
Method Detail
clear
public void clear()
getExecutionContext
public ExecutionContext getExecutionContext(StepExecution stepExecution)
- Specified by:
getExecutionContext
in interfaceExecutionContextDao
- Parameters:
stepExecution
-StepExecution
instance that contains the context.- Returns:
- execution context associated with the given stepExecution
updateExecutionContext
public void updateExecutionContext(StepExecution stepExecution)
Description copied from interface:ExecutionContextDao
Persist the updates of execution context associated with the given stepExecution. Persistent entry should already exist for this context.- Specified by:
updateExecutionContext
in interfaceExecutionContextDao
- Parameters:
stepExecution
-StepExecution
instance that contains the context.
getExecutionContext
public ExecutionContext getExecutionContext(JobExecution jobExecution)
- Specified by:
getExecutionContext
in interfaceExecutionContextDao
- Parameters:
jobExecution
-JobExecution
instance that contains the context.- Returns:
- execution context associated with the given jobExecution
updateExecutionContext
public void updateExecutionContext(JobExecution jobExecution)
Description copied from interface:ExecutionContextDao
Persist the updates of execution context associated with the given jobExecution. Persistent entry should already exist for this context.- Specified by:
updateExecutionContext
in interfaceExecutionContextDao
- Parameters:
jobExecution
-JobExecution
instance that contains the context.
saveExecutionContext
public void saveExecutionContext(JobExecution jobExecution)
Description copied from interface:ExecutionContextDao
Persist the execution context associated with the given jobExecution, persistent entry for the context should not exist yet.- Specified by:
saveExecutionContext
in interfaceExecutionContextDao
- Parameters:
jobExecution
-JobExecution
instance that contains the context.
saveExecutionContext
public void saveExecutionContext(StepExecution stepExecution)
Description copied from interface:ExecutionContextDao
Persist the execution context associated with the given stepExecution, persistent entry for the context should not exist yet.- Specified by:
saveExecutionContext
in interfaceExecutionContextDao
- Parameters:
stepExecution
-StepExecution
instance that contains the context.
saveExecutionContexts
public void saveExecutionContexts(java.util.Collection<StepExecution> stepExecutions)
Description copied from interface:ExecutionContextDao
Persist the execution context associated with each stepExecution in a given collection, persistent entry for the context should not exist yet.- Specified by:
saveExecutionContexts
in interfaceExecutionContextDao
- Parameters:
stepExecutions
- a collection ofStepExecution
s that contain the contexts.