Package ubic.gemma.core.util
Class ProgressReporter
- java.lang.Object
-
- ubic.gemma.core.util.ProgressReporter
-
public class ProgressReporter extends Object
Report progress.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description ProgressReporter(Object what, String logCategory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reportProgress(long progressInBytes, long maxSizeInBytes)
Report progress.void
reportProgress(long progressInBytes, long maxSizeInBytes, boolean atEnd)
Report progress.void
setProgressIncrementToReportInBytes(double progressIncrementToReportInBytes)
Set the minimum progress increment size to report in bytes.void
setProgressIncrementToReportInPercent(double progressIncrementToReportInPercent)
Set the minimum progress increment size to report in percentage.
-
-
-
Method Detail
-
setProgressIncrementToReportInPercent
public void setProgressIncrementToReportInPercent(double progressIncrementToReportInPercent)
Set the minimum progress increment size to report in percentage.This is used if maxSizeInBytes is set.
-
setProgressIncrementToReportInBytes
public void setProgressIncrementToReportInBytes(double progressIncrementToReportInBytes)
Set the minimum progress increment size to report in bytes.This is used if maxSizeInBytes is unknown.
-
reportProgress
public void reportProgress(long progressInBytes, long maxSizeInBytes)
Report progress.This method assumes that if progressInBytes and maxSizeInBytes are equal, this is the last report.
-
reportProgress
public 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
-
-