|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IKielerProgressMonitor
Interface for monitors of progress of a job. A progress monitor can be used
in conjunction with IAlgorithm
to track progress of an algorithm run.
Field Summary | |
---|---|
static float |
UNKNOWN_WORK
constant indicating an unknown amount of work. |
Method Summary | |
---|---|
void |
begin(String name,
float totalWork)
Notifies that the task will begin after this method has been called. |
void |
done()
Notifies that the current task is done and closes the monitor. |
double |
getExecutionTime()
Returns the measured execution time for the task associated with this monitor. |
IKielerProgressMonitor |
getParentMonitor()
Returns the parent monitor. |
List<IKielerProgressMonitor> |
getSubMonitors()
Returns a list of all monitors associated with direct sub-tasks. |
String |
getTaskName()
Returns the name of the task associated with this progress monitor. |
boolean |
isCanceled()
Returns whether cancellation of the task has been requested. |
IKielerProgressMonitor |
subTask(float work)
Creates a new sub-task that will complete the given amount of work units when it is done. |
void |
worked(float work)
Notifies that the given number of work units has been completed. |
Field Detail |
---|
static final float UNKNOWN_WORK
Method Detail |
---|
void begin(String name, float totalWork)
name
- readable name of the new tasktotalWork
- total amount of work units, or UNKNOWN_WORK
if this is not specifiedvoid done()
void worked(float work)
work
- number of work unitsboolean isCanceled()
IKielerProgressMonitor subTask(float work)
#begin(String, int)
is
called for the new progress monitor instance, and it ends when
done()
is called for that instance.
work
- number of work units that are completed in the current
monitor instance when the sub-task is done
List<IKielerProgressMonitor> getSubMonitors()
IKielerProgressMonitor getParentMonitor()
#subTask(int)
resulted in the current monitor instance.
String getTaskName()
double getExecutionTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |