public class IterationStrategyImpl extends Object implements IterationStrategy
Modifier and Type | Class and Description |
---|---|
class |
IterationStrategyImpl.TerminalNodeImpl
The terminal node is used internally as the root of the iteration
strategy tree, it is responsible for forwarding all events up to the
iteration strategy itself which can then propogate them to the strategy
stack.
|
Modifier and Type | Field and Description |
---|---|
protected IterationStrategyStackImpl |
stack |
Constructor and Description |
---|
IterationStrategyImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addInput(NamedInputPortNode nipn) |
protected void |
configureFromXML(org.jdom.Element strategyElement)
Configure from an XML element
|
void |
connectDefault(NamedInputPortNode nipn)
Connect up a new named input port node to the first child of the terminal
node.
|
Map<String,Integer> |
getDesiredCardinalities()
Return a map of port name -> desired cardinality for this iteration
strategy
|
int |
getIterationDepth(Map<String,Integer> inputDepths)
The iteration strategy results in a set of job objects with a particular
job index.
|
TerminalNode |
getTerminalNode() |
void |
normalize() |
void |
receiveCompletion(String inputPortName,
String owningProcess,
int[] completionArray,
InvocationContext context) |
void |
receiveData(String inputPortName,
String owningProcess,
int[] indexArray,
T2Reference dataReference,
InvocationContext context)
Receive a single data event from an upstream process.
|
protected void |
receiveEvent(IterationInternalEvent<?> e)
Receive a single job from an upstream IterationStrategyImpl in the stack.
|
void |
removeInput(NamedInputPortNode nipn) |
void |
removeInputByName(String name) |
void |
setIterationStrategyStack(IterationStrategyStackImpl stack) |
protected IterationStrategyStackImpl stack
public TerminalNode getTerminalNode()
getTerminalNode
in interface IterationStrategy
protected void configureFromXML(org.jdom.Element strategyElement)
strategyElement
- protected void receiveEvent(IterationInternalEvent<?> e)
j
- public void receiveData(String inputPortName, String owningProcess, int[] indexArray, T2Reference dataReference, InvocationContext context) throws WorkflowStructureException
inputPortName
- owningProcess
- indexArray
- dataReference
- WorkflowStructureException
public void receiveCompletion(String inputPortName, String owningProcess, int[] completionArray, InvocationContext context) throws WorkflowStructureException
WorkflowStructureException
public void addInput(NamedInputPortNode nipn)
public void removeInput(NamedInputPortNode nipn)
public void removeInputByName(String name)
public void setIterationStrategyStack(IterationStrategyStackImpl stack)
public void connectDefault(NamedInputPortNode nipn)
nipn
- public int getIterationDepth(Map<String,Integer> inputDepths) throws IterationTypeMismatchException
IterationStrategy
getIterationDepth
in interface IterationStrategy
inputDepths
- map of port names to input collection depthIterationTypeMismatchException
public Map<String,Integer> getDesiredCardinalities()
IterationStrategy
getDesiredCardinalities
in interface IterationStrategy
public void normalize()
normalize
in interface IterationStrategy
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.