Package org.mapfish.print.processor
Class ProcessorExecutionContext
java.lang.Object
org.mapfish.print.processor.ProcessorExecutionContext
Contains information shared across all nodes being executed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allAreFinished
(Set<ProcessorGraphNode<?, ?>> processorNodes) Verify that all processors have finished executing atomically (within the same lock asfinished(ProcessorGraphNode)
andisFinished(ProcessorGraphNode)
is within.void
cancel()
Set acancel
flag.void
finished
(ProcessorGraphNode processorGraphNode) Flag that the processor has completed execution.boolean
isFinished
(ProcessorGraphNode processorGraphNode) Return true if the processor of the node has previously been executed.boolean
isRunning
(ProcessorGraphNode processorGraphNode) Return true if the processor of the node is currently being executed.boolean
tryStart
(ProcessorGraphNode processorGraphNode) Try to start the node of a processor.
-
Constructor Details
-
ProcessorExecutionContext
Constructor.- Parameters:
values
- the values object.
-
-
Method Details
-
getValues
-
tryStart
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
Return true if the processor of the node is currently being executed.- Parameters:
processorGraphNode
- the node to test.
-
isFinished
Return true if the processor of the node has previously been executed.- Parameters:
processorGraphNode
- the node to test.
-
finished
Flag that the processor has completed execution.- Parameters:
processorGraphNode
- the node that has finished.
-
allAreFinished
Verify that all processors have finished executing atomically (within the same lock asfinished(ProcessorGraphNode)
andisFinished(ProcessorGraphNode)
is within.- Parameters:
processorNodes
- the node to check for completion.
-
cancel
public void cancel()Set acancel
flag.All processors are supposed to check this flag frequently and terminate the execution if requested.
-
getContext
-
getMDCContext
-