|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNodeLinearTask
public class NodeLinearTask
A task that we expect to run in time roughly linear in the number of nodes a model contains. The linear factor corresponds to the number of "steps" that makeup this task, i.e. how many times we expect the overall task to process each node.
Constructor Summary | |
---|---|
NodeLinearTask(String description,
Estimate estimate,
int steps,
String[] notes)
|
Method Summary | |
---|---|
ProgressMonitorable[] |
decompose()
Simple task decomposes into only itself. |
String |
getDescription()
|
String |
getNote()
|
int |
getProgress()
|
int |
getProgressMax()
|
boolean |
isFinished()
|
void |
join(long timeout)
important: relies on setFinished(true) |
void |
setFinished(boolean flag)
It is preferable for the code that creates this task to call setFinished(true) when the task is certainly completed. |
void |
touch()
The computation code should call this every time it processes a node, thus updating the overall progress. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeLinearTask(String description, Estimate estimate, int steps, String[] notes)
steps
- The linear factor, i.e. how many times we expect the overall task to process each node.notes
- Array should have the same size as the steps parameter. One note for each "step" of the task.Method Detail |
---|
public void touch()
public int getProgress()
getProgress
in interface ProgressMonitorable
public int getProgressMax()
getProgressMax
in interface ProgressMonitorable
public boolean isFinished()
isFinished
in interface ProgressMonitorable
public void join(long timeout) throws InterruptedException
InterruptedException
public void setFinished(boolean flag)
public String getNote()
getNote
in interface ProgressMonitorable
public ProgressMonitorable[] decompose()
decompose
in interface ProgressMonitorable
public String getDescription()
getDescription
in interface ProgressMonitorable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |