in jbatch/src/main/java/org/apache/batchee/container/services/persistence/MemoryPersistenceManagerService.java [343:384]
public StepExecutionImpl createStepExecution(final long rootJobExecId, final StepContextImpl stepContext) {
final String batchStatus = stepContext.getBatchStatus() == null ? BatchStatus.STARTING.name() : stepContext.getBatchStatus().name();
final String exitStatus = stepContext.getExitStatus();
final String stepName = stepContext.getStepName();
long readCount = 0;
long writeCount = 0;
long commitCount = 0;
long rollbackCount = 0;
long readSkipCount = 0;
long processSkipCount = 0;
long filterCount = 0;
long writeSkipCount = 0;
Timestamp startTime = stepContext.getStartTimeTS();
Timestamp endTime = stepContext.getEndTimeTS();
final Metric[] metrics = stepContext.getMetrics();
for (final Metric metric : metrics) {
if (metric.getType().equals(MetricImpl.MetricType.READ_COUNT)) {
readCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.WRITE_COUNT)) {
writeCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.PROCESS_SKIP_COUNT)) {
processSkipCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.COMMIT_COUNT)) {
commitCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.ROLLBACK_COUNT)) {
rollbackCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.READ_SKIP_COUNT)) {
readSkipCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.FILTER_COUNT)) {
filterCount = metric.getValue();
} else if (metric.getType().equals(MetricImpl.MetricType.WRITE_SKIP_COUNT)) {
writeSkipCount = metric.getValue();
}
}
final Serializable persistentData = stepContext.getPersistentUserData();
return createStepExecution(rootJobExecId, batchStatus, exitStatus, stepName, readCount,
writeCount, commitCount, rollbackCount, readSkipCount, processSkipCount, filterCount, writeSkipCount, startTime,
endTime, persistentData);
}