org.kuali.common.util
Class PercentCompleteInformer

java.lang.Object
  extended by org.kuali.common.util.AbstractProgressInformer
      extended by org.kuali.common.util.PercentCompleteInformer

public class PercentCompleteInformer
extends AbstractProgressInformer

Print a dot to the console each time we make at least 1% progress towards the total


Field Summary
protected  long progress
           
 
Constructor Summary
PercentCompleteInformer()
           
PercentCompleteInformer(long total)
           
PercentCompleteInformer(long total, LogMsg startMessage)
           
 
Method Summary
 int getPercentageIncrement()
           
 int getPercentCompletePrevious()
           
 long getTotal()
           
 void incrementProgress()
          Thread safe method for incrementing progress by one
 void incrementProgress(long amount)
          Thread safe method for incrementing progress by amount
protected  boolean isEnoughProgress(int percentComplete, int percentCompletePrevious, int percentageIncrement)
           
 void setPercentageIncrement(int percentageIncrement)
           
 void setPercentCompletePrevious(int percentCompletePrevious)
           
 void setTotal(long total)
           
 
Methods inherited from class org.kuali.common.util.AbstractProgressInformer
getCompleteToken, getPrintStream, getProgress, getProgressToken, getStartMessage, getStartToken, getStopMessage, setCompleteToken, setPrintStream, setProgressToken, setStartMessage, setStartToken, setStopMessage, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

progress

protected long progress
Constructor Detail

PercentCompleteInformer

public PercentCompleteInformer()

PercentCompleteInformer

public PercentCompleteInformer(long total)

PercentCompleteInformer

public PercentCompleteInformer(long total,
                               LogMsg startMessage)
Method Detail

incrementProgress

public void incrementProgress()
Thread safe method for incrementing progress by one


incrementProgress

public void incrementProgress(long amount)
Thread safe method for incrementing progress by amount


isEnoughProgress

protected boolean isEnoughProgress(int percentComplete,
                                   int percentCompletePrevious,
                                   int percentageIncrement)

getPercentageIncrement

public int getPercentageIncrement()

setPercentageIncrement

public void setPercentageIncrement(int percentageIncrement)

getPercentCompletePrevious

public int getPercentCompletePrevious()

setPercentCompletePrevious

public void setPercentCompletePrevious(int percentCompletePrevious)

getTotal

public long getTotal()

setTotal

public void setTotal(long total)


Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.