Package ubic.gemma.core.util
Class AbstractProgressReporter
java.lang.Object
ubic.gemma.core.util.AbstractProgressReporter
- All Implemented Interfaces:
AutoCloseable,ProgressReporter
- Direct Known Subclasses:
ConsoleProgressReporter,LoggingProgressReporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoReportProgress(double progressInPercent, long progressInBytes, long maxSizeInBytes, boolean atEnd) protected abstract voiddoReportUnknownProgress(long progressInBytes, boolean atEnd) voidreportProgress(long progressInBytes, long maxSizeInBytes) Report progress.voidreportProgress(long progressInBytes, long maxSizeInBytes, boolean atEnd) Report progress.voidsetProgressIncrementToReportInBytes(double progressIncrementToReportInBytes) Set the minimum progress increment size to report in bytes.voidsetProgressIncrementToReportInPercent(double progressIncrementToReportInPercent) Set the minimum progress increment size to report in percentage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.core.util.ProgressReporter
close
-
Constructor Details
-
AbstractProgressReporter
public AbstractProgressReporter()
-
-
Method Details
-
setProgressIncrementToReportInPercent
public void setProgressIncrementToReportInPercent(double progressIncrementToReportInPercent) Description copied from interface:ProgressReporterSet the minimum progress increment size to report in percentage.This is used if maxSizeInBytes is set.
- Specified by:
setProgressIncrementToReportInPercentin interfaceProgressReporter
-
setProgressIncrementToReportInBytes
public void setProgressIncrementToReportInBytes(double progressIncrementToReportInBytes) Description copied from interface:ProgressReporterSet the minimum progress increment size to report in bytes.This is used if maxSizeInBytes is unknown.
- Specified by:
setProgressIncrementToReportInBytesin interfaceProgressReporter
-
reportProgress
public void reportProgress(long progressInBytes, long maxSizeInBytes) Description copied from interface:ProgressReporterReport progress.This method assumes that if progressInBytes and maxSizeInBytes are equal, this is the last report.
- Specified by:
reportProgressin interfaceProgressReporter
-
reportProgress
public void reportProgress(long progressInBytes, long maxSizeInBytes, boolean atEnd) Description copied from interface:ProgressReporterReport progress.- Specified by:
reportProgressin interfaceProgressReporter- Parameters:
progressInBytes- progress in bytesmaxSizeInBytes- maximum size in bytes if known, else -1atEnd- indicate that this is the last progress report
-
doReportProgress
protected abstract void doReportProgress(double progressInPercent, long progressInBytes, long maxSizeInBytes, boolean atEnd) -
doReportUnknownProgress
protected abstract void doReportUnknownProgress(long progressInBytes, boolean atEnd)
-