Class RelationTask
- 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
Methods inherited from class nz.org.riskscape.engine.task.WorkerTask
consumeProcessingResult, getContext, getFirstStep, getFirstStepRealizedResult, getLastStep, getName, getPageReader, getPageWriter, getSpec, getSpecNameBrief, hasInputPage, hasOutputPage, hasPageInProgress, isComplete, isCreated, isInputReady, isOutputReady, isReadyToRun, isStarted, markComplete, markStarted, runPublic, taskComplete, toString
-
Constructor Details
-
RelationTask
-
-
Method Details
-
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
-
close
public void close()Description copied from class:WorkerTask
Override this method to clean up any resources that were allocated/created by this task for use during execution. Will be called from the scheduler once the task has signaled it is complete, but it may also get called if a job that this task was part of has failed.
Thread safety should be ensured by requiring the scheduler to only call close on a task that is not currently being run.
Implementations shouldn't need to do any buffer management in this method, it's meant for closing things like
TupleIterator
s or other sorts of resources that follow theCloseable
pattern.- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classWorkerTask
-
producesResult
public boolean producesResult()- Specified by:
producesResult
in classWorkerTask
-