Package nz.org.riskscape.engine.task
Class SinkTask
java.lang.Object
nz.org.riskscape.engine.task.WorkerTask
nz.org.riskscape.engine.task.SinkTask
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsFields inherited from class nz.org.riskscape.engine.task.WorkerTask
contextSwitches, id, in, out, pageReader, pageWriter, processingResult, runtime, runtimeAverage, spec -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class nz.org.riskscape.engine.task.WorkerTask
close, consumeProcessingResult, getContext, getFirstStep, getFirstStepRealizedResult, getLastStep, getName, getPageReader, getPageWriter, getSpec, hasInputPage, hasOutputPage, hasPageInProgress, isComplete, isCreated, isInputReady, isOutputReady, isStarted, markComplete, markStarted, runPublic, taskComplete, toString
-
Field Details
-
sink
public final nz.org.riskscape.engine.pipeline.Sink sink
-
-
Constructor Details
-
SinkTask
- Throws:
nz.org.riskscape.problem.ProblemException
-
-
Method Details
-
getRealizedStep
public nz.org.riskscape.engine.pipeline.RealizedStep getRealizedStep() -
isReadyToRun
public boolean isReadyToRun()Description copied from class:WorkerTaskReturns 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:
isReadyToRunin classWorkerTask
-
run
Description copied from class:WorkerTaskProcesses 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:
runin classWorkerTask
-
producesResult
public boolean producesResult()- Specified by:
producesResultin classWorkerTask
-
getSpecNameBrief
- Overrides:
getSpecNameBriefin classWorkerTask- Returns:
- a unique name for the worker's TaskSpec that is brief and user-friendly. This can be used as a simple way to represent the work that this task is doing to the user.
-
getSink
public nz.org.riskscape.engine.pipeline.Sink getSink()
-