Package org.mapfish.print.processor
Class ProcessorDependencyGraph
- java.lang.Object
-
- org.mapfish.print.processor.ProcessorDependencyGraph
-
public final class ProcessorDependencyGraph extends java.lang.Object
Represents a graph of the processors dependencies. The root nodes can execute in parallel but processors with dependencies must wait for their dependencies to complete before execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ProcessorDependencyGraph.ProcessorGraphForkJoinTask
A ForkJoinTask that will create ForkJoinTasks from each root and run each of them.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessorDependencyGraph.ProcessorGraphForkJoinTask
createTask(Values values)
Create a ForkJoinTask for running in a fork join pool.java.util.Set<Processor<?,?>>
getAllProcessors()
Create a set containing all the processors in the graph.com.google.common.collect.Multimap<java.lang.String,Processor>
getAllRequiredAttributes()
Get all the names of inputs that are required to be in the Values object when this graph is executed.java.util.List<ProcessorGraphNode<?,?>>
getRoots()
java.lang.String
toString()
void
toString(java.lang.StringBuilder builder, int indent, java.lang.String parent)
Create a string representing the nodes.
-
-
-
Method Detail
-
createTask
public ProcessorDependencyGraph.ProcessorGraphForkJoinTask createTask(@Nonnull Values values)
Create a ForkJoinTask for running in a fork join pool.- Parameters:
values
- the values to use for getting the required inputs of the processor and putting the output in.- Returns:
- a task ready to be submitted to a fork join pool.
-
getAllRequiredAttributes
public com.google.common.collect.Multimap<java.lang.String,Processor> getAllRequiredAttributes()
Get all the names of inputs that are required to be in the Values object when this graph is executed.
-
getRoots
public java.util.List<ProcessorGraphNode<?,?>> getRoots()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public void toString(java.lang.StringBuilder builder, int indent, java.lang.String parent)
Create a string representing the nodes.- Parameters:
builder
- the builder to add the string to.indent
- the number of steps of indent for this nodeparent
- the parent node
-
getAllProcessors
public java.util.Set<Processor<?,?>> getAllProcessors()
Create a set containing all the processors in the graph.
-
-