Package com.complexible.common.base
Class ProgressMonitor.ReportingProgressMonitor
- java.lang.Object
-
- com.complexible.common.base.ProgressMonitor
-
- com.complexible.common.base.ProgressMonitor.ReportingProgressMonitor
-
- All Implemented Interfaces:
Progress,ProgressReporter,java.lang.AutoCloseable
- Enclosing class:
- ProgressMonitor
public static class ProgressMonitor.ReportingProgressMonitor extends ProgressMonitor
Chain more than one monitor / reporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.complexible.common.base.ProgressMonitor
ProgressMonitor.Builder, ProgressMonitor.DefaultProgressFormatter, ProgressMonitor.DelegatingProgressMonitor, ProgressMonitor.ProgressFormatter, ProgressMonitor.ReportingProgressMonitor
-
Nested classes/interfaces inherited from interface com.complexible.common.base.Progress
Progress.Default
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcurrent()Returns the current progress valuevoidincrement(long delta)Increments the current progress by given delta and prints the progress if necessary.voidincrementMaxProgress(long theMaxProgress)Increments the maximum progress value for this monitorlongmaxProgress()Returns the maximum progress value for this monitorvoidprint()Print the current progress, implementations may implement this as a no-opjava.lang.Stringstage()Returns the current stage of the process, or null if none.voidstage(java.lang.String stageName)Set the name of current stage of the process.voidstop()Stops the current progress monitor causing it to print a final message-
Methods inherited from class com.complexible.common.base.ProgressMonitor
builder, create, fixedIntervalMonitor, minimal, newBufferedMonitor, newMultiplyingMonitor, silent, tpsFormatter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.complexible.common.base.Progress
hasProgress
-
Methods inherited from interface com.complexible.common.base.ProgressReporter
close
-
-
-
-
Method Detail
-
increment
public void increment(long delta)
Description copied from interface:ProgressReporterIncrements the current progress by given delta and prints the progress if necessary.
-
maxProgress
public long maxProgress()
Description copied from interface:ProgressReturns the maximum progress value for this monitor
-
incrementMaxProgress
public void incrementMaxProgress(long theMaxProgress)
Description copied from interface:ProgressReporterIncrements the maximum progress value for this monitor
-
current
public long current()
Description copied from interface:ProgressReturns the current progress value
-
print
public void print()
Description copied from interface:ProgressReporterPrint the current progress, implementations may implement this as a no-op- Specified by:
printin interfaceProgressReporter- Specified by:
printin classProgressMonitor
-
stop
public void stop()
Description copied from class:ProgressMonitorStops the current progress monitor causing it to print a final message- Specified by:
stopin interfaceProgressReporter- Specified by:
stopin classProgressMonitor
-
stage
public java.lang.String stage()
Description copied from interface:ProgressReturns the current stage of the process, or null if none.
-
stage
public void stage(java.lang.String stageName)
Description copied from interface:ProgressReporterSet the name of current stage of the process.
-
-