Class TimedProgressOperation

java.lang.Object
com.atlassian.crowd.util.TimedOperation
com.atlassian.crowd.util.TimedProgressOperation

public class TimedProgressOperation extends TimedOperation
A class used for timing log messages. Construct an instance and provide the total number of units of work. Then, call incrementProgress() or incrementedProgress() each time around the loop. If more than gapTime (by default one minute) has passed since the start (or last logging) then progress will be logged at INFO. Otherwise, progress will be logged as TRACE.
  • Constructor Details

    • TimedProgressOperation

      public TimedProgressOperation(String action, int total, org.slf4j.Logger log)
    • TimedProgressOperation

      public TimedProgressOperation(String action, int total, org.slf4j.Logger log, long gapTime)
  • Method Details

    • incrementProgress

      public void incrementProgress()
      Indicate that a unit of work is about to be done, and log if necessary.
    • incrementedProgress

      public void incrementedProgress()
      Indicate that a unit of work has been done, and log if necessary.