Class ClusteredRegistration.TaskExecutor

    • Field Detail

      • f_sTaskId

        protected final String f_sTaskId
        The identity of the Task to execute.
      • m_task

        protected Task m_task
        The Task to execute.
      • f_fRecovered

        protected final boolean f_fRecovered
        Indicates if the Task was previously assigned to a different Executor.
      • m_executionThread

        protected volatile Thread m_executionThread
        The thread this task is currently running on.
        Since:
        22.06
    • Method Detail

      • setResult

        public void setResult​(Result result)
        Set the result processing result.
        Parameters:
        result - the result to report
      • setResult

        public void setResult​(Result result,
                              boolean fComplete)
        Set the result processing result.
        Parameters:
        result - the result to report
        fComplete - whether execution is completed
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • setResult

        public void setResult​(Object result)
        Description copied from interface: Task.Context
        Sets the intermediate result a Task has produced while being executed by an Executor as part of an Task.Orchestration.

        The provided result may be later collected by an TaskExecutorService according to the configured Task.Collector and then published to registered Task.Subscribers.

        Multiple calls to this method are permitted during the execution of a Task, thus permitting a stream of results to be collected and thus published.

        Specified by:
        setResult in interface Task.Context
        Parameters:
        result - the result
      • isDone

        public boolean isDone()
        Description copied from interface: Task.Context
        Determines if a Task completed according to the TaskExecutorService.

        Completion may be due to normal termination, an exception or cancellation. In all of these cases, this method will return true.

        Specified by:
        isDone in interface Task.Context
        Returns:
        true if the Task is considered completed false otherwise
      • isCancelled

        public boolean isCancelled()
        Description copied from interface: Task.Context
        Determines if a Task was cancelled.
        Specified by:
        isCancelled in interface Task.Context
        Returns:
        true if the task was cancelled
      • getExecutionThread

        protected Thread getExecutionThread()
        Returns the Thread this task is currently executing on.
        Returns:
        the Thread this task is currently executing on