Class ProcessorExecutionContext


  • public final class ProcessorExecutionContext
    extends java.lang.Object
    Contains information shared across all nodes being executed.
    • Constructor Detail

      • ProcessorExecutionContext

        public ProcessorExecutionContext​(Values values)
        Constructor.
        Parameters:
        values - the values object.
    • Method Detail

      • getValues

        public Values getValues()
      • tryStart

        public boolean tryStart​(ProcessorGraphNode processorGraphNode)
        Try to start the node of a processor.

        In case the processor is already running, has already finished or if not all requirements have finished, the processor can not start. If the above conditions are fulfilled, the processor is added to the list of running processors, and is expected to be started from the caller.

        Parameters:
        processorGraphNode - the node that should start.
        Returns:
        if the node of the processor can be started.
      • isRunning

        public boolean isRunning​(ProcessorGraphNode processorGraphNode)
        Return true if the processor of the node is currently being executed.
        Parameters:
        processorGraphNode - the node to test.
      • isFinished

        public boolean isFinished​(ProcessorGraphNode processorGraphNode)
        Return true if the processor of the node has previously been executed.
        Parameters:
        processorGraphNode - the node to test.
      • finished

        public void finished​(ProcessorGraphNode processorGraphNode)
        Flag that the processor has completed execution.
        Parameters:
        processorGraphNode - the node that has finished.
      • cancel

        public void cancel()
        Set a cancel flag.

        All processors are supposed to check this flag frequently and terminate the execution if requested.

      • getMDCContext

        public java.util.Map<java.lang.String,​java.lang.String> getMDCContext()