Class ReportIntervalCounter


  • public class ReportIntervalCounter
    extends ReportInterval
    A report interval extension that also handles tracking progress. The progress can be incremented and retrieved. If a task ends before reaching its next reporting interval the unreported progress can be retrieve as well.
    Author:
    Evren Sirin
    • Constructor Detail

      • ReportIntervalCounter

        public ReportIntervalCounter​(long theInterval)
    • Method Detail

      • getCount

        public long getCount()
        Returns current progress count;
      • hasUnreported

        public boolean hasUnreported()
        Returns true if there is unreported progress.
      • getUnreported

        public long getUnreported()
        Returns the unreported progress since last report.
      • increment

        public boolean increment()
        Increments the progress counter by one and returns true if report interval has been reached.
      • increment

        public boolean increment​(long theAmount)
        Increments the progress counter by the given amount and returns true if report interval has been reached.