Class ProgressMonitor.ReportingProgressMonitor

java.lang.Object
com.complexible.common.base.ProgressMonitor
com.complexible.common.base.ProgressMonitor.ReportingProgressMonitor
All Implemented Interfaces:
Progress, ProgressReporter, AutoCloseable
Enclosing class:
ProgressMonitor

public static class ProgressMonitor.ReportingProgressMonitor extends ProgressMonitor
Chain more than one monitor / reporter
  • Method Details

    • increment

      public void increment(long delta)
      Description copied from interface: ProgressReporter
      Increments the current progress by given delta and prints the progress if necessary.
    • maxProgress

      public long maxProgress()
      Description copied from interface: Progress
      Returns the maximum progress value for this monitor
    • incrementMaxProgress

      public void incrementMaxProgress(long theMaxProgress)
      Description copied from interface: ProgressReporter
      Increments the maximum progress value for this monitor
    • current

      public long current()
      Description copied from interface: Progress
      Returns the current progress value
    • print

      public void print()
      Description copied from interface: ProgressReporter
      Print the current progress, implementations may implement this as a no-op
      Specified by:
      print in interface ProgressReporter
      Specified by:
      print in class ProgressMonitor
    • stop

      public void stop()
      Description copied from class: ProgressMonitor
      Stops the current progress monitor causing it to print a final message
      Specified by:
      stop in interface ProgressReporter
      Specified by:
      stop in class ProgressMonitor
    • stage

      public String stage()
      Description copied from interface: Progress
      Returns the current stage of the process, or null if none.
    • stage

      public void stage(String stageName)
      Description copied from interface: ProgressReporter
      Set the name of current stage of the process.