|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
dcf.tasks.RandomizerTask
Randomizer Task - Simply holds an array of ints.
The solver will randomly fill them with integers.
Note: This is a circualr task, What this means is that when the task
is done it will generate a new task with itself as the input.
A circular task could optionally create a different kind of task
thus, you might want to create a group of tasks where each task
handles only a part of the whole solution.
| Constructor Summary | |
RandomizerTask()
|
|
| Method Summary | |
void |
addResult(java.lang.Object obj)
|
void |
divide()
Divide the task into parts - if the data is a List it is already divided. |
java.util.Vector |
generate()
If this is a circular task it should generate a vector of new tasks |
java.lang.Object |
getData()
|
dcf.tasks.String |
getName()
|
java.lang.Object |
getResults()
|
int |
getSize()
|
boolean |
hasMore()
|
boolean |
isCircular()
The Distributer will call this method when a Task is returned by the client. If the task is circualr the client will call the generate() method to create additinal tasks. |
java.lang.Object |
next()
|
void |
processResults()
Called by Distributer when a task is returned. |
void |
setData(java.lang.Object obj)
|
void |
setName(dcf.tasks.String n)
|
void |
setParent(Worker w)
Sets the parent for this task. |
void |
setProgress(float i)
Sets the task progress (used by the Solver to set it to the Worker) |
| Methods inherited from interface dcf.server.Task |
setName |
| Constructor Detail |
public RandomizerTask()
| Method Detail |
public void setData(java.lang.Object obj)
setData in interface Taskdcf.server.Taskobj - Most commonly a Vector of data to be processed.public java.lang.Object getData()
getData in interface Taskpublic void divide()
Taskdivide in interface Taskpublic boolean hasMore()
hasMore in interface Taskpublic java.lang.Object next()
next in interface Taskpublic int getSize()
getSize in interface Taskpublic void addResult(java.lang.Object obj)
addResult in interface Taskdcf.server.Taskobj - An Object to add to the results.public java.lang.Object getResults()
getResults in interface Taskpublic void setName(dcf.tasks.String n)
public dcf.tasks.String getName()
getName in interface Taskpublic boolean isCircular()
TaskisCircular in interface Taskdcf.server.Taskpublic java.util.Vector generate()
Taskgenerate in interface Taskdcf.server.Taskpublic void processResults()
TaskprocessResults in interface Taskpublic void setParent(Worker w)
TasksetParent in interface Taskdcf.server.Taskw - The active Worker for this task.public void setProgress(float i)
i - The progress for this task.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||