Example usage for org.springframework.batch.repeat RepeatStatus FINISHED

List of usage examples for org.springframework.batch.repeat RepeatStatus FINISHED

Introduction

In this page you can find the example usage for org.springframework.batch.repeat RepeatStatus FINISHED.

Prototype

RepeatStatus FINISHED

To view the source code for org.springframework.batch.repeat RepeatStatus FINISHED.

Click Source Link

Document

Indicates that processing is finished (either successful or unsuccessful)

Usage

From source file:com.spring.batch.FirstStep.java

@Override
public RepeatStatus execute(StepContribution arg0, ChunkContext arg1) throws Exception {
    System.out.println("firstStep");
    return RepeatStatus.FINISHED;
}

From source file:com.spring.batch.SecondStep.java

@Override
public RepeatStatus execute(StepContribution arg0, ChunkContext arg1) throws Exception {
    System.out.println("sencondStep");
    return RepeatStatus.FINISHED;
}

From source file:de.langmi.spring.batch.examples.basics.tasklet.CustomTasklet.java

public RepeatStatus customMethod() throws Exception {
    // why not using println? because it makes testing harder, *nix and
    // windows think different about new line as in \n vs \r\n
    System.out.print("Hello World!");

    // we want the step to stop here, the other status 
    // RepeatStatus.CONTINUABLE would start an endless loop here
    return RepeatStatus.FINISHED;
}

From source file:com.github.ffremont.tasklet.SimpleTasklet.java

/**
 * {@inheritDoc}//from w w  w  .j  a va  2  s  .  c o m
 */
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    // why not using println? because it makes testing harder, *nix and
    // windows think different about new line as in \n vs \r\n
    LOG.info("Hello World!");

    // we want the step to stop here, the other status 
    // RepeatStatus.CONTINUABLE would start an endless loop here
    return RepeatStatus.FINISHED;
}

From source file:cn.cuizuoli.appranking.batch.tasklet.ResetSeqTasklet.java

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    appRankingService.resetSeq();//from w w w .j  av a2  s.  c om
    return RepeatStatus.FINISHED;
}

From source file:io.spring.batch.CustomTasklet.java

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    System.out.println("**********************************************");
    System.out.println("      HELLO World!!!");
    System.out.println("**********************************************");

    return RepeatStatus.FINISHED;
}

From source file:com.enterra.batch.admin.util.TestTasklet.java

public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    if (fail) {//from   ww w. ja v  a  2 s  . c  om
        throw new IllegalStateException("Planned Tasklet failure");
    }
    return RepeatStatus.FINISHED;
}

From source file:prototypes.batches.chunking.tasklet.SimpleTasklet.java

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    LOGGER.debug("Simple Tasklet : " + simpleAttribute);
    return RepeatStatus.FINISHED;
}

From source file:de.langmi.spring.batch.examples.basics.purejava.PureJavaJobFactory.java

public static Job createJob(JobRepository jobRepository, PlatformTransactionManager transactionManager) {
    JobBuilderFactory jobBuilderFactory = new JobBuilderFactory(jobRepository);
    StepBuilderFactory stepBuilderFactory = new StepBuilderFactory(jobRepository, transactionManager);

    Step step = stepBuilderFactory.get("step1").tasklet(new Tasklet() {

        @Override/*from   w  w  w.  j  a va2  s  .com*/
        public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
            // why not using println? because it makes testing harder, *nix and
            // windows think different about new line as in \n vs \r\n
            System.out.print("Hello World!");

            // we want the step to stop here, the other status 
            // RepeatStatus.CONTINUABLE would start an endless loop
            return RepeatStatus.FINISHED;

        }
    }).build();

    return jobBuilderFactory.get("job1").start(step).build();
}

From source file:info.smartkit.hairy_batman.jobs.TaskParseWxArticleTitle.java

/**
 * {@inheritDoc}/*from   w  ww . j  a va  2 s.c om*/
 */
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
    LOG.info("execute");
    return RepeatStatus.FINISHED;
}