com.atlassian.core.util
Class ProgressMeter
java.lang.Object
com.atlassian.core.util.ProgressMeter
public class ProgressMeter
- extends java.lang.Object
A ProgressMeter class may be used to record progress of an on-going task while this progress is being monitored by
another client. To support this use case the class is thread safe.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProgressMeter
public ProgressMeter()
setPercentage
public void setPercentage(int count,
int total)
- Use this method to set the completion %age to object 10 of 30 etc.
- Parameters:
count - The current object count in progresstotal - The total number of objects to be processed
setStatus
public void setStatus(java.lang.String status)
getPercentageComplete
public int getPercentageComplete()
- Returns:
- the percentage completion. A value of 100 can be taken to indicate that progress is finished.
getStatus
public java.lang.String getStatus()
setPercentage
public void setPercentage(int percentageComplete)
getCurrentCount
public int getCurrentCount()
setCurrentCount
public void setCurrentCount(int currentCount)
getTotal
public int getTotal()
setTotalObjects
public void setTotalObjects(int total)
isCompletedSuccessfully
public boolean isCompletedSuccessfully()
- This method should only be called once you know the task is complete (which is discovered by calling
getPercentageComplete().
- Returns:
- true if the task completed successfully; false if there was an error which prevented the task from
completing.
setCompletedSuccessfully
public void setCompletedSuccessfully(boolean completedSuccessfully)
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.