Class MapStepExecutionDao
- java.lang.Object
- org.springframework.batch.core.repository.dao.MapStepExecutionDao
- All Implemented Interfaces:
StepExecutionDao
public class MapStepExecutionDao extends java.lang.Object implements StepExecutionDao
In-memory implementation ofStepExecutionDao
.
Constructor Summary
Constructors Constructor Description MapStepExecutionDao()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStepExecutions(JobExecution jobExecution)
Retrieve all theStepExecution
for the parentJobExecution
.void
clear()
StepExecution
getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
Retrieve aStepExecution
from its id.void
saveStepExecution(StepExecution stepExecution)
Save the given StepExecution.void
saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
Save the given collection of StepExecution as a batch.void
updateStepExecution(StepExecution stepExecution)
Update the given StepExecution Preconditions: Id must not be null.
Method Detail
clear
public void clear()
saveStepExecution
public void saveStepExecution(StepExecution stepExecution)
Description copied from interface:StepExecutionDao
Save the given StepExecution. Preconditions: Id must be null. Postconditions: Id will be set to a unique Long.- Specified by:
saveStepExecution
in interfaceStepExecutionDao
- Parameters:
stepExecution
-StepExecution
instance to be saved.
updateStepExecution
public void updateStepExecution(StepExecution stepExecution)
Description copied from interface:StepExecutionDao
Update the given StepExecution Preconditions: Id must not be null.- Specified by:
updateStepExecution
in interfaceStepExecutionDao
- Parameters:
stepExecution
-StepExecution
instance to be updated.
getStepExecution
@Nullable public StepExecution getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)
Description copied from interface:StepExecutionDao
Retrieve aStepExecution
from its id.- Specified by:
getStepExecution
in interfaceStepExecutionDao
- Parameters:
jobExecution
- the parentJobExecution
stepExecutionId
- the step execution id- Returns:
- a
StepExecution
addStepExecutions
public void addStepExecutions(JobExecution jobExecution)
Description copied from interface:StepExecutionDao
Retrieve all theStepExecution
for the parentJobExecution
.- Specified by:
addStepExecutions
in interfaceStepExecutionDao
- Parameters:
jobExecution
- the parent job execution
saveStepExecutions
public void saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)
Description copied from interface:StepExecutionDao
Save the given collection of StepExecution as a batch. Preconditions: StepExecution Id must be null. Postconditions: StepExecution Id will be set to a unique Long.- Specified by:
saveStepExecutions
in interfaceStepExecutionDao
- Parameters:
stepExecutions
- a collection ofJobExecution
instances to be saved.