martin.common.compthreads
Class Master<E>
java.lang.Object
martin.common.compthreads.Master<E>
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- ArrayBasedMaster, IteratorBasedMaster
public abstract class Master<E>
- extends java.lang.Object
- implements java.lang.Runnable
Method Summary |
boolean |
getReportProgress()
|
(package private) abstract void |
report(E solution,
int id)
|
abstract void |
run()
|
void |
setReportProgress(boolean v)
Set whether the object should report once each computational process is finished. |
java.lang.Thread |
startThread()
Spawns a new thread for the master object and starts it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reportProgress
private boolean reportProgress
Master
public Master()
report
abstract void report(E solution,
int id)
run
public abstract void run()
- Specified by:
run
in interface java.lang.Runnable
setReportProgress
public void setReportProgress(boolean v)
- Set whether the object should report once each computational process is finished.
- Parameters:
v
-
getReportProgress
public boolean getReportProgress()
- Returns:
- the reportProgress
startThread
public java.lang.Thread startThread()
- Spawns a new thread for the master object and starts it.
- Returns:
- A reference to the executing thread.