Class Overview
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.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
Public Methods
public
synchronized
int
getCurrentCount
()
public
synchronized
int
getPercentageComplete
()
Returns
- the percentage completion. A value of 100 can be taken to indicate that progress is finished.
public
synchronized
String
getStatus
()
public
synchronized
int
getTotal
()
public
synchronized
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.
public
synchronized
void
setCompletedSuccessfully
(boolean completedSuccessfully)
public
synchronized
void
setCurrentCount
(int currentCount)
public
synchronized
void
setPercentage
(int percentageComplete)
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 progress |
total
| The total number of objects to be processed
|
public
synchronized
void
setStatus
(String status)
public
synchronized
void
setTotalObjects
(int total)