|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Progress
A Generic way of keeping track of Threads and monitoring their progress.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
static int |
UNKNOWN
Indicate that the total amount of work is unknown. |
Method Summary | |
---|---|
void |
beginJob(String sectionName)
Start the task measured from 0 to 100. |
void |
beginJob(String sectionName,
int totalWork)
Start the task reporting progress toward total work. |
void |
beginJob(String sectionName,
URI predictURI)
Start the task using timings from a prior run as a guess for the current run. |
void |
cancel()
Cancel the job (if possible). |
void |
done()
Called to indicate that we are finished doing work. |
String |
getJobName()
|
ProgressMode |
getProgressMode()
Gets the current ProgressMode. |
String |
getSectionName()
The section name is used in reporting progress. |
int |
getTotalWork()
|
int |
getWork()
Return the computed percentage as an integer, typically from 0 to 100. |
int |
getWorkDone()
|
void |
incrementWorkDone(int step)
Indicate progress toward the whole. |
boolean |
isCancelable()
Might the job be cancelable? |
boolean |
isFinished()
Used to determine whether job is done or canceled or reached totalWork. |
void |
setCancelable(boolean newCancelable)
Indicates whether the job is cancelable or not. |
void |
setSectionName(String name)
We have moved onto another section so update the section title. |
void |
setTotalWork(int totalWork)
Set the total amount of work to be done. |
void |
setWork(int progress)
Indicate progress toward 100%. |
void |
setWorkDone(int progress)
Indicate progress toward the whole. |
Field Detail |
---|
static final int UNKNOWN
Method Detail |
---|
void beginJob(String sectionName)
sectionName
- the initial name of the job.void beginJob(String sectionName, int totalWork)
sectionName
- the initial name of the job.totalWork
- the total amount that is to be worked.void beginJob(String sectionName, URI predictURI)
sectionName
- the initial name of the job.predictURI
- the URI of a properties file from which past behavior is read
and the results of the current run are stored.String getJobName()
ProgressMode getProgressMode()
int getTotalWork()
void setTotalWork(int totalWork)
totalWork
- the total amount of work to be done in units that make sense
to the caller.int getWork()
void setWork(int progress)
progress
- a part of the whole.int getWorkDone()
void setWorkDone(int progress)
progress
- a part of the whole.void incrementWorkDone(int step)
step
- the amount of work done since the last call.String getSectionName()
void setSectionName(String name)
name
- the name of the sectionvoid done()
void cancel()
boolean isFinished()
boolean isCancelable()
void setCancelable(boolean newCancelable)
newCancelable
- The state to set.
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |