Class ProgressMonitor

  • All Implemented Interfaces:
    org.springframework.batch.core.ItemWriteListener, org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.StepListener

    public class ProgressMonitor
    extends java.lang.Object
    implements org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.ItemWriteListener
    • Field Detail

      • progressBar

        protected me.tongfei.progressbar.ProgressBar progressBar
    • Constructor Detail

      • ProgressMonitor

        public ProgressMonitor​(TransferOptions.Progress style,
                               java.lang.String taskName,
                               java.time.Duration updateInterval,
                               java.util.function.Supplier<java.lang.Long> initialMax)
    • Method Detail

      • beforeStep

        public void beforeStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        beforeStep in interface org.springframework.batch.core.StepExecutionListener
      • afterStep

        public org.springframework.batch.core.ExitStatus afterStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        afterStep in interface org.springframework.batch.core.StepExecutionListener
      • beforeWrite

        public void beforeWrite​(java.util.List items)
        Specified by:
        beforeWrite in interface org.springframework.batch.core.ItemWriteListener
      • afterWrite

        public void afterWrite​(java.util.List items)
        Specified by:
        afterWrite in interface org.springframework.batch.core.ItemWriteListener
      • onWriteError

        public void onWriteError​(java.lang.Exception exception,
                                 java.util.List items)
        Specified by:
        onWriteError in interface org.springframework.batch.core.ItemWriteListener