Interface Task

    • Method Summary

      Modifier and Type Method Description
      void runTask()
      Executes this sequential process.
      void setTaskContext​(TaskContext taskContext)
      Sets the context used to managed this Task.
      TaskContext taskContext()
      Returns the context used to managed this Task.
      void taskDidCancel()
      Lifecycle callback invoked after this Task is explicitly cancelled.
      boolean taskWillBlock()
      Returns true if this Task might block its thread of execution when running; returns false if this Task will never block.
      void taskWillCue()
      Lifecycle callback invoked before this Task is scheduled for execution.
    • Method Detail

      • taskContext

        TaskContext taskContext()
        Returns the context used to managed this Task. Returns null if this Task is not bound to a Stage.
      • setTaskContext

        void setTaskContext​(TaskContext taskContext)
        Sets the context used to managed this Task. A TaskContext is assigned when binding this Task to a Stage.
      • runTask

        void runTask()
        Executes this sequential process. Only one thread at a time will execute runTask for this Task.
        Specified by:
        runTask in interface TaskFunction
      • taskWillBlock

        boolean taskWillBlock()
        Returns true if this Task might block its thread of execution when running; returns false if this Task will never block. Used by the execution Stage to prevent thread starvation when concurrently running many blocking tasks.
      • taskWillCue

        void taskWillCue()
        Lifecycle callback invoked before this Task is scheduled for execution.
      • taskDidCancel

        void taskDidCancel()
        Lifecycle callback invoked after this Task is explicitly cancelled.