|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmartin.common.compthreads.Worker<E>
E - the class of the result from the computations.class Worker<E>
Worker thread class for performing concurrent computations.
| Field Summary | |
|---|---|
private int |
id
|
private Master<E> |
master
|
private Problem<E> |
problem
|
| Constructor Summary | |
|---|---|
Worker(Problem<E> problem,
Master<E> master,
int id)
|
|
| Method Summary | |
|---|---|
void |
run()
runs the compute() function of the problem, and then reports back to the master object with the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Problem<E> problem
private Master<E> master
private int id
| Constructor Detail |
|---|
Worker(Problem<E> problem,
Master<E> master,
int id)
problem - the problem which is to be computedmaster - master object to report back to when finishedid - the id of the problem| Method Detail |
|---|
public void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||