class AnyFanAny
AnyFanAny is used to connect many source processes to many destination process such that any incoming data object will be written to the next process using the output channel. It essentially provides a one place buffer in that as soon as input is ready it can be read and then written to any ready output channel.
Once the UniversalTerminator is read from the any end of the input channel, a tally will be kept until all the UniversalTerminator objects are read from all the source processes. The process will then output a UniversalTerminator object to each of the destination processes.
The incoming data is not modified in any manner.
Behaviour: while true outputAny.write( inputAny.read() )
outputAny
- A one2any Channel used to write data objects to the next processinputAny
- An any2one channel from which incoming data objects are readsources
- The number of source processes.destinations
- The number of destination processes.
Type | Name and description |
---|---|
int |
destinations |
ChannelInput |
inputAny |
ChannelOutput |
outputAny |
int |
sources |
Constructor and description |
---|
AnyFanAny
() |
GPP - Groovy Parallel Patterns generated 06112016 by Jon Kerridge, Edinburgh Napier University - j.kerridge@napier.ac.uk