public final class ProcessorGraphNode<In,Out>
extends java.lang.Object
ProcessorDependencyGraph).
| Modifier and Type | Class and Description |
|---|---|
static class |
ProcessorGraphNode.ProcessorNodeForkJoinTask<In,Out>
A ForkJoinTask that will run the processor and all of its dependencies.
|
| Constructor and Description |
|---|
ProcessorGraphNode(Processor<In,Out> processor,
com.codahale.metrics.MetricRegistry metricRegistry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(ProcessorGraphNode node)
Add a dependency to this node.
|
java.util.Optional<ProcessorGraphNode.ProcessorNodeForkJoinTask<In,Out>> |
createTask(ProcessorExecutionContext execContext)
Create a ForkJoinTask for running in a fork join pool.
|
java.util.Set<? extends Processor<?,?>> |
getAllProcessors()
Create a set containing all the processor at the current node and the entire subgraph.
|
protected java.util.Set<ProcessorGraphNode<?,?>> |
getDependencies() |
com.google.common.collect.BiMap<java.lang.String,java.lang.String> |
getInputMapper()
Return input mapper from processor.
|
java.lang.String |
getName() |
com.google.common.collect.BiMap<java.lang.String,java.lang.String> |
getOutputMapper()
Get the output mapper from processor.
|
Processor<?,?> |
getProcessor() |
protected java.util.Set<ProcessorGraphNode> |
getRequirements() |
boolean |
hasRequirements()
Returns true if the node has requirements, that is there are other nodes that should be run first.
|
java.lang.String |
toString() |
void |
toString(java.lang.StringBuilder builder,
int indent,
java.lang.String parent)
Create a string representing this node.
|
public Processor<?,?> getProcessor()
public void addDependency(ProcessorGraphNode node)
node - the dependency to add.protected java.util.Set<ProcessorGraphNode> getRequirements()
protected java.util.Set<ProcessorGraphNode<?,?>> getDependencies()
public boolean hasRequirements()
public java.util.Optional<ProcessorGraphNode.ProcessorNodeForkJoinTask<In,Out>> createTask(@Nonnull ProcessorExecutionContext execContext)
execContext - the execution context, used for tracking certain aspects of the execution.@Nonnull public com.google.common.collect.BiMap<java.lang.String,java.lang.String> getOutputMapper()
@Nonnull public com.google.common.collect.BiMap<java.lang.String,java.lang.String> getInputMapper()
public void toString(java.lang.StringBuilder builder,
int indent,
java.lang.String parent)
builder - the builder to add the string to.indent - the number of steps of indent for this nodeparent - the parent nodepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public java.util.Set<? extends Processor<?,?>> getAllProcessors()