public abstract class CompletionHandlingAbstractIterationStrategyNode extends AbstractIterationStrategyNode
If the event received is final, that is to say it has an index of zero, and final events have been received on all other inputs and at least one final completion has been received then emit a final completion, otherwise do nothing.
This means that subclasses should not emit final completion events themselves - these will be handled by this superclass and emiting them in the subclass will lead to duplicatation.
Modifier and Type | Class and Description |
---|---|
protected class |
CompletionHandlingAbstractIterationStrategyNode.CompletionState
Container class for the state of completion for a given process
identifier
|
allowsChildren, EMPTY_ENUMERATION, userObject
Constructor and Description |
---|
CompletionHandlingAbstractIterationStrategyNode() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cleanUp(String owningProcess)
Called after a final completion event has been emited for a given owning
process, should be used by subclasses to do any tidying required,
removing state etc.
|
protected CompletionHandlingAbstractIterationStrategyNode.CompletionState |
getCompletionState(String owningProcess) |
protected abstract void |
innerReceiveCompletion(int inputIndex,
Completion completion) |
protected abstract void |
innerReceiveJob(int inputIndex,
Job newJob) |
void |
receiveCompletion(int inputIndex,
Completion completion)
Nodes can also receive completion events, the simplest being one
declaring that no further input is expected on the given input, or
partial completion events which are interpreted as 'no event with an
index array prefixed by the specified completion index array will be
received on the specified index'
|
void |
receiveJob(int inputIndex,
Job newJob)
The nodes within the iteration strategy, a tree structure, are event
based.
|
children, clear, getAllowsChildren, getChildAt, getChildCount, getChildren, getIndex, getParent, insert, insert, isLeaf, pushCompletion, pushJob, remove, remove, removeFromParent, setParent, setUserObject
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, removeAllChildren, setAllowsChildren, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIterationDepth
public CompletionHandlingAbstractIterationStrategyNode()
public final void receiveCompletion(int inputIndex, Completion completion)
IterationStrategyNode
public final void receiveJob(int inputIndex, Job newJob)
IterationStrategyNode
protected abstract void cleanUp(String owningProcess)
owningProcess
- protected CompletionHandlingAbstractIterationStrategyNode.CompletionState getCompletionState(String owningProcess)
protected abstract void innerReceiveCompletion(int inputIndex, Completion completion)
protected abstract void innerReceiveJob(int inputIndex, Job newJob)
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.