Class ProgressReporter

java.lang.Object
ubic.gemma.core.util.ProgressReporter

public class ProgressReporter extends Object
Report progress.
Author:
poirigui
  • Constructor Details

    • ProgressReporter

      public ProgressReporter(Object what, String logCategory)
  • Method Details

    • 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 bytes
      maxSizeInBytes - maximum size in bytes if known, else -1
      atEnd - indicate that this is the last progress report