class Root
Root is part of the Divide and Conquer process architecture and is intended to operate in conjunction with a Node process. A further process is required such as OneDirectedList that will send an output from Root on the outPart channel to each of the Node processes.
Methods required by the data class, in addition to those used by Emit: nodeInitialise(nodeId) -> creates a copy of the data class to be written to Node[nodeId] partition(nodeId) -> returns a new object that gets written to Node[nodeId] that contains the data required for each iteration combine(feedBackClass) -> incorporated the data held in feedBackClass into the matrix held in in the Root node repeat() -> determines if there is a need to undertaken another iteration The behaviour of the process: matrix = input.read() (0 ..< nodes) { nodeData = matrix.nodeInitialise(i) outPart.write(nodePart) } while (iterating){ (0 ..< nodes) { circulate = matrix.partition(i) outPart.write(circulate) } (0 ..< nodes) { feedBackClass = feedback.read() matrix.combine(feedBackClass) if (!finalResult) output.write(matrix) iterating = matrix.repeat() }
input
- The channel from which input objkects are readoutput
- The channel to which processed objects are writtenfeedback
- The input channel from which updates are read from a Node processoutPart
- The channel used to write intermediate objects to a Node process probably using a spreader processnodeInitialise
- The name of the nodeInitialise methodpartition
- The name of the partition methodcombine
- The name of the combine methodrepeat
- The name pf the repeat methodnodes
- The number of Node processesfinalResult
- If true only the final processed object is written to output. If false the current state
of each iteration of the processed object is output. The default value is true.logPhaseName
- an optional string property, which if specified indicates that the process should be logged
otherwise the process will not be loggedlogPropertyName
- the name of a property in the eDetails object that will uniquely identify an instance of the object.
LogPropertyName must be specified if logPhaseName is specifiedType | Name and description |
---|---|
String |
combine |
ChannelInput |
feedback |
boolean |
finalResult |
ChannelInput |
input |
String |
logPhaseName |
String |
logPropertyName |
String |
nodeInitialise |
int |
nodes |
ChannelOutput |
outPart |
ChannelOutput |
output |
String |
partition |
String |
repeat |
Constructor and description |
---|
Root
() |
GPP - Groovy Parallel Patterns generated 06112016 by Jon Kerridge, Edinburgh Napier University - j.kerridge@napier.ac.uk