class N_WayMerge
The N_WayMerge process accespts inputs from its inputList and uses the method mergeChoice to determine which of the available inputs will be written to the output channel in such a way as to maintain an overall sorted order. It is presumed that the input data stream will be read in a sorted order.
inputList
- the channel input list used to read input data objectsoutput
- the channel to which data objects are writteninClassName
- A String containing the name of the class that the process will readmergeChoice
- the name of a method contained in the input class that chooses the next input
object to write to the output channel
The method mergeChoice has the declaration:
static int mergeChoice (List
mergeChoice then returns the index of the element of buffers that has been selected
It is guaranteed that at least one of the buffers elements will contain valid data
If a terminating value has been read from a channel list element then the corresponding
buffers element will be null.
Type | Name and description |
---|---|
String |
inClassName |
ChannelInputList |
inputList |
String |
mergeChoice |
ChannelOutput |
output |
Constructor and description |
---|
N_WayMerge
() |
GPP - Groovy Parallel Patterns generated 06112016 by Jon Kerridge, Edinburgh Napier University - j.kerridge@napier.ac.uk