com.atlassian.crowd.util
Class TimedProgressOperation

java.lang.Object
  extended by com.atlassian.crowd.util.TimedOperation
      extended by 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.


Field Summary
 
Fields inherited from class com.atlassian.crowd.util.TimedOperation
start
 
Constructor Summary
TimedProgressOperation(String action, int total, org.slf4j.Logger log)
           
TimedProgressOperation(String action, int total, org.slf4j.Logger log, long gapTime)
           
 
Method Summary
 void incrementedProgress()
          Indicate that a unit of work has been done, and log if necessary.
 void incrementProgress()
          Indicate that a unit of work is about to be done, and log if necessary.
 
Methods inherited from class com.atlassian.crowd.util.TimedOperation
complete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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.



Copyright © 2014 Atlassian. All Rights Reserved.