|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.branchnbound.core.Worker
***FOR INTERNAL USE ONLY
Field Summary | |
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
Worker()
The active object empty constructor. |
|
Worker(TaskQueue taskProvider)
Construct a new worker with a reference on a task queue. |
Method Summary | |
void |
alive()
Pinging the current worker. |
Result |
execute(Task task)
Start the computation of the given task. |
Result |
getBestCurrentResult()
|
Task |
getCurrentTask()
|
void |
immediateStopComputation()
Stop the current task computation. |
void |
informNewBestResult(Result newBest)
Broadcast the best new localy found solution to all task and to the task queue. |
BooleanWrapper |
isHungry()
|
void |
reset()
Reset the worker for a new computation. |
void |
sendSubTasksToTheManager(java.util.Vector subTaskList)
Add a set of sub-task to the task queue. |
void |
setBestCurrentResult(Result newBest)
Update the best local result with the new one. |
void |
setWorkerGroup(Worker workerGroup)
Set the group of this worker. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
Constructor Detail |
public Worker()
public Worker(TaskQueue taskProvider)
taskProvider
- this task queue.Method Detail |
public Result execute(Task task)
task
- the task to compute.
public void setWorkerGroup(Worker workerGroup)
workerGroup
- the group of workers.public void setBestCurrentResult(Result newBest)
newBest
- a new best result.public Result getBestCurrentResult()
public void informNewBestResult(Result newBest)
newBest
- the best new solution.public void sendSubTasksToTheManager(java.util.Vector subTaskList)
subTaskList
- the set of sub-tasks.public BooleanWrapper isHungry()
true
if the task queue needs more tasks.public void immediateStopComputation()
public Task getCurrentTask()
public void alive()
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |