Class DummyTasklet

  • All Implemented Interfaces:
    org.springframework.batch.core.step.tasklet.StoppableTasklet, org.springframework.batch.core.step.tasklet.Tasklet

    public class DummyTasklet
    extends java.lang.Object
    implements org.springframework.batch.core.step.tasklet.StoppableTasklet, org.springframework.batch.core.step.tasklet.Tasklet
    A dummy tasklet for testing/demo purposes.
    • Constructor Summary

      Constructors 
      Constructor Description
      DummyTasklet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution sc, org.springframework.batch.core.scope.context.ChunkContext cc)  
      java.lang.String getName()  
      int getRepeats()  
      int getSleepTimeMs()  
      void setEmulateFailures​(int emulateFailures)  
      void setName​(java.lang.String name)  
      void setRepeats​(int repeats)  
      void setSleepTimeMs​(int sleepTimeMs)  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DummyTasklet

        public DummyTasklet()
    • Method Detail

      • execute

        public org.springframework.batch.repeat.RepeatStatus execute​(org.springframework.batch.core.StepContribution sc,
                                                                     org.springframework.batch.core.scope.context.ChunkContext cc)
                                                              throws java.lang.Exception
        Specified by:
        execute in interface org.springframework.batch.core.step.tasklet.Tasklet
        Throws:
        java.lang.Exception
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getRepeats

        public int getRepeats()
      • setRepeats

        public void setRepeats​(int repeats)
      • getSleepTimeMs

        public int getSleepTimeMs()
      • setSleepTimeMs

        public void setSleepTimeMs​(int sleepTimeMs)
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.batch.core.step.tasklet.StoppableTasklet
      • setEmulateFailures

        public void setEmulateFailures​(int emulateFailures)