|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.util.concurrency.job.ConcurrentJob
public abstract class ConcurrentJob
This class forms the basis for a job that can be run concurrently.
Constructor Summary | |
---|---|
ConcurrentJob(StatusReportable report)
Construct a concurrent job. |
Method Summary | |
---|---|
boolean |
getShouldStop()
|
int |
getThreadCount()
|
boolean |
isRunning()
|
abstract int |
loadWorkload()
Load the subtasks. |
abstract void |
performJobUnit(JobUnitContext context)
Perform one job unit. |
void |
process()
Process the job. |
void |
processBackground()
|
void |
reportStatus(JobUnitContext context,
String status)
Report the status for this job. |
abstract Object |
requestNextTask()
Request the next task to be processed. |
void |
run()
|
void |
setReport(StatusReportable r)
|
void |
setThreadCount(int numThreads)
Set the number of threads to use. |
void |
stop()
Request the process to stop. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentJob(StatusReportable report)
report
- The object to report status to.Method Detail |
---|
public abstract int loadWorkload()
public abstract void performJobUnit(JobUnitContext context)
context
- The context for the job unit.public void process()
public void processBackground()
public void reportStatus(JobUnitContext context, String status)
context
- The job context.status
- The status to report.public abstract Object requestNextTask()
public boolean getShouldStop()
public void stop()
public void run()
run
in interface Runnable
public boolean isRunning()
public void setReport(StatusReportable r)
public int getThreadCount()
getThreadCount
in interface MultiThreadable
public void setThreadCount(int numThreads)
setThreadCount
in interface MultiThreadable
numThreads
- The number of threads to use, or zero to
automatically determine based on core count.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |