A FarmPattern comprises a sequence of processes in a pipeline. The sequence comprises Emit; FanOutAny; Farm; FarmInAny; Collect. The properties of the pattern provide all the external values required to run the FarmPattern. The internal channels required to connect the processes together are all declared within the class outwith programmer concerns.
dataClassName
- The name of the class that is to be processed within the FarmresultsClassName
- The name of the class to which results are sent and then finally processedworkerClassname
- The name of the worker class associated with the GroupworkerInitData
- A list comprising parameters to initialise the workerClassinitialData
- Any data used to initialise any static variables of the
class. This data will be used as a parameter in the call to
the class initClass methodcreateData
- Any data used to initialise an object instance of the class used
in a call to the class createInstance method workerOp
- The code value identifying the operation to be undertaken
by the Worker processesmodifier
- Contains a possible modifier for the operation, with each Worker
accessing the element that corresponds to the index of the Worker.workers
- The number of Worker processes that will be created
when the Group is runoutData
- If true the process will output each processed input object. If false the process will output
the workerClass once only, after it has processed all the input data objects. The output
only happens after the finalise method has been called. outData defaults to true.synchronised
- If true the worker processes will synchronise with each other before they output any data,
thereby providing a means whereby each worker process will output results once the process
reading from the final stage of the pipeline has read that dataType | Name and description |
---|---|
def |
createData |
String |
dataClassName |
def |
initialData |
boolean |
outData |
String |
resultsClassName |
def |
run |
boolean |
synchronised |
String |
workerClassName |
def |
workerInitData |
int |
workerOp |
int |
workers |
Constructor and description |
---|
FarmPattern
() |
GPP - Groovy Parallel Patterns generated test by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk