@Bean public Step lastStep() { return stepBuilderFactory.get("lastStep") .tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { System.out.println(">> Ending concurrent job test"); return RepeatStatus.FINISHED; } }).build(); }
@Bean Step step1 () { return stepFactory.get("step1").tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { return RepeatStatus.FINISHED; } }).build(); }
@Bean protected Step step1() throws Exception { return steps.get("step1").tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { return null; } }).build(); }
@Bean public Step step() { return stepBuilderFactory.get("step1").tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { return null; } }).build(); }
@Bean protected Step step3() throws Exception { return steps.get("step3").tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext context) throws Exception { return RepeatStatus.FINISHED; } }).build(); } }
@Bean public Step firstStep() { return stepBuilderFactory.get("firstStep") .tasklet(new Tasklet() { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { System.out.println(">> Beginning concurrent job test"); return RepeatStatus.FINISHED; } }).build(); }
@Bean protected Step step3() throws Exception { return steps.get("step3").tasklet(tasklet).build(); }
@Bean public Step step() throws Exception { return this.steps.get("step") .<Person, Person>chunk(1) .reader(itemReader()) .processor(itemValidator()) .writer(itemWriter()) .build(); }
@Bean protected Step step2() throws Exception { return steps.get("step2").tasklet(tasklet()).build(); }
@Bean protected Step step1() throws Exception { return steps.get("step1").tasklet(tasklet()).build(); }
@Bean protected Step step1() throws Exception { return steps.get("step1").tasklet(tasklet()).build(); }
@Bean protected Step step2() throws Exception { return steps.get("step2").tasklet(tasklet()).build(); }
@Bean public Step flowStep() throws Exception { return steps.get("flowStep").flow(simpleFlow()).build(); }
@Bean protected Step step() { return steps.get("step").<Trade, Object> chunk(1).reader(reader()).writer(writer()).faultTolerant() .retry(Exception.class).retryLimit(3).build(); }
@Bean public Job job() { return this.jobBuilderFactory.get("job") .start(this.stepBuilderFactory.get("step") .tasklet((contribution, chunkContext) -> RepeatStatus.FINISHED) .build()) .build(); } }
@Bean public Step step() { return steps.get("step") .<Trade, Trade>chunk(2) .reader(itemReader()) .writer(itemWriter()) .build(); }
@Override @Bean public Step step(){ return stepBuilders.get("step") .listener(listener()) .<String,String>chunk(2) .reader(reader()) .writer(writer()) .build(); } }
@Bean public Step stepUnderTest() { return stepBuilder.get("step-under-test") .<String, String>chunk(1) .reader(reader()) .processor(processor()) .writer(writer()) .build(); }
@Bean public Step step1(StepBuilderFactory stepBuilderFactory, ItemReader<String> fakeItemReader, ItemProcessor<String, String> fakeProcessor, ItemWriter<String> fakeItemWriter, ItemProcessListener<String, String> itemProcessListener) { return stepBuilderFactory.get("testStep").<String, String>chunk(10) .reader(fakeItemReader) .processor(fakeProcessor) .writer(fakeItemWriter) .listener(itemProcessListener) .faultTolerant().skipLimit(50).skip(RuntimeException.class) .build(); }
@Bean public Job concurrentJob() { Flow splitFlow = new FlowBuilder<Flow>("splitflow").split(new SimpleAsyncTaskExecutor()).add(flow(), flow(), flow(), flow(), flow(), flow(), flow()).build(); return jobBuilderFactory.get("concurrentJob") .start(firstStep()) .next(stepBuilderFactory.get("splitFlowStep") .flow(splitFlow) .build()) .next(lastStep()) .build(); }