Package ubic.gemma.core.util
Interface ProgressReporter
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractProgressReporter,ConsoleProgressReporter,LoggingProgressReporter
Report progress.
- Author:
- poirigui
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Clear any progress that was rendered.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.
-
Method Details
-
setProgressIncrementToReportInPercent
void setProgressIncrementToReportInPercent(double progressIncrementToReportInPercent) Set the minimum progress increment size to report in percentage.This is used if maxSizeInBytes is set.
-
setProgressIncrementToReportInBytes
void setProgressIncrementToReportInBytes(double progressIncrementToReportInBytes) Set the minimum progress increment size to report in bytes.This is used if maxSizeInBytes is unknown.
-
reportProgress
void reportProgress(long progressInBytes, long maxSizeInBytes) Report progress.This method assumes that if progressInBytes and maxSizeInBytes are equal, this is the last report.
-
reportProgress
void reportProgress(long progressInBytes, long maxSizeInBytes, boolean atEnd) Report progress.- Parameters:
progressInBytes- progress in bytesmaxSizeInBytes- maximum size in bytes if known, else -1atEnd- indicate that this is the last progress report
-
close
void close()Clear any progress that was rendered.- Specified by:
closein interfaceAutoCloseable
-