Package nz.org.riskscape.engine.task
Class AccumulatorProcessorTask<T>
java.lang.Object
nz.org.riskscape.engine.task.WorkerTask
nz.org.riskscape.engine.task.AccumulatorProcessorTask<T>
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields inherited from class nz.org.riskscape.engine.task.WorkerTask
id, in, out, pageReader, pageWriter, processingResult, runtime, runtimeAverage, spec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the task has work it can do.boolean
run()
Processes the work that the task has to do.protected ReturnState
Methods inherited from class nz.org.riskscape.engine.task.WorkerTask
close, consumeProcessingResult, getContext, getFirstStep, getFirstStepRealizedResult, getLastStep, getName, getPageReader, getPageWriter, getSpec, getSpecNameBrief, hasInputPage, hasOutputPage, hasPageInProgress, isComplete, isCreated, isInputReady, isOutputReady, isStarted, markComplete, markStarted, runPublic, toString
-
Constructor Details
-
AccumulatorProcessorTask
-
-
Method Details
-
isReadyToRun
public boolean isReadyToRun()Description copied from class:WorkerTask
Returns true if the task has work it can do. Returns false if the task is blocked waiting on either more input, more output buffers to free up, or it's dependent on other tasks that haven't completed yet.
- Overrides:
isReadyToRun
in classWorkerTask
-
run
Description copied from class:WorkerTask
Processes the work that the task has to do. The task doesn't necessarily run to completion in one go - it's likely that the task will run out of input or output first, so it'll need to keep coming back and chipping away at the work.
- Specified by:
run
in classWorkerTask
-
producesResult
public boolean producesResult()- Specified by:
producesResult
in classWorkerTask
-
taskComplete
- Overrides:
taskComplete
in classWorkerTask
-