本文整理汇总了Java中org.springframework.batch.core.annotation.AfterStep类的典型用法代码示例。如果您正苦于以下问题:Java AfterStep类的具体用法?Java AfterStep怎么用?Java AfterStep使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AfterStep类属于org.springframework.batch.core.annotation包,在下文中一共展示了AfterStep类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: afterStep
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
final Interval interval = new Interval(
stepExecution.getStartTime().getTime(),
System.currentTimeMillis());
LOG.debug("Finished step: {} in {}. read = {} write = {} commit = {} rollback = {} filter = {} skip = {}",
stepExecution.getStepName(), PeriodFormat.getDefault().print(interval.toPeriod()),
stepExecution.getReadCount(), stepExecution.getWriteCount(),
stepExecution.getCommitCount(), stepExecution.getRollbackCount(),
stepExecution.getFilterCount(),
stepExecution.getSkipCount());
return stepExecution.getExitStatus();
}
示例2: dispose
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
/**
* Dispose the excel object
*/
@AfterStep
public void dispose()
{
if(excel != null)
try{ excel.dispose(); } catch(Exception e){}
}
示例3: afterStep
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
File file = fileService.getById(getServiceContext(), getFileId());
file.setTotalRecordCount(stepExecution.getReadCount() + stepExecution.getReadSkipCount());
fileService.addOrUpdate(getServiceContext(), file);
return null;
}
示例4: afterStep
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
log.info("스텝 완료 후 호출됩니다. StepName=[{}], ExitStatus=[{}]",
stepExecution.getStepName(), stepExecution.getExitStatus());
return ExitStatus.COMPLETED;
}
示例5: saveStepExecution
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@AfterStep
public void saveStepExecution(final StepExecution stepExecution) {
this.key2vcf.values().stream().forEach(V->{try {V.close();}catch(Exception err){}});;
stepExecution.getExecutionContext().putString("file", "out");
}
示例6: afterStep
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@Override
@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
log.info("$$$ after step {}",stepExecution.getStepName());
return null;
}
示例7: afterStep
import org.springframework.batch.core.annotation.AfterStep; //导入依赖的package包/类
@Override
@AfterStep
public ExitStatus afterStep(StepExecution stepExecution) {
return null;
}