@Override public ExitStatus afterStep(StepExecution stepExecution) { count++; return super.afterStep(stepExecution); } });
@Override public void beforeStep(StepExecution stepExecution) { count++; if (error) { throw new RuntimeException("listener error"); } super.beforeStep(stepExecution); }
@Override public void afterChunk(ChunkContext context) { count++; if (error) { throw new RuntimeException("listener error"); } super.afterChunk(context); }
@Override public void beforeRead() { count++; if (error) { throw new RuntimeException("listener error"); } super.beforeRead(); }
@Override public void beforeChunk(ChunkContext context) { count++; if (error) { throw new RuntimeException("listener error"); } super.beforeChunk(context); }
@Override public void beforeWrite(List<? extends String> items) { count++; if (error) { throw new RuntimeException("listener error"); } super.beforeWrite(items); }
@Override public void onReadError(Exception ex) { count++; if (error) { throw new RuntimeException("listener error"); } super.onReadError(ex); }
@Override public void afterRead(Integer item) { count++; if (error) { throw new RuntimeException("listener error"); } super.afterRead(item); }
@Override public void afterWrite(List<? extends String> items) { count++; if (error) { throw new RuntimeException("listener error"); } super.afterWrite(items); }
@Override public ExitStatus afterStep(StepExecution stepExecution) { count++; return super.afterStep(stepExecution); } }));
@Override public void beforeStep(final StepExecution stepExecution) { stepName = stepExecution.getJobExecution().getJobInstance().getJobName() + "." + stepExecution.getStepName(); super.beforeStep(stepExecution); }
@Override public ExitStatus afterStep(StepExecution stepExecution) { count++; if (error) { throw new RuntimeException("listener error"); } return super.afterStep(stepExecution); }
@Override public ExitStatus afterStep(final StepExecution stepExecution) { stepName = UNKNOWN; return super.afterStep(stepExecution); }
@Override public ExitStatus afterStep(StepExecution pStepExecution) { if (LOG.isInfoEnabled()) { StringBuilder msg = new StringBuilder(); msg.append("Step ").append(pStepExecution.getStepName()); msg.append(" - Read count: ").append(pStepExecution.getReadCount()); msg.append(" - Write count: ").append(pStepExecution.getWriteCount()); msg.append(" - Commit count: ").append(pStepExecution.getCommitCount()); LOG.info(msg.toString()); } return super.afterStep(pStepExecution); }