Class AccumulatorProcessorTask<T>

java.lang.Object
nz.org.riskscape.engine.task.WorkerTask
nz.org.riskscape.engine.task.AccumulatorProcessorTask<T>
All Implemented Interfaces:
AutoCloseable

public class AccumulatorProcessorTask<T> extends WorkerTask
  • Constructor Details

    • AccumulatorProcessorTask

      public AccumulatorProcessorTask(TaskSpec spec)
  • 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 class WorkerTask
    • run

      public ReturnState 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 class WorkerTask
    • producesResult

      public boolean producesResult()
      Specified by:
      producesResult in class WorkerTask
    • taskComplete

      protected ReturnState taskComplete()
      Overrides:
      taskComplete in class WorkerTask