|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovyx.gpars.dataflow.DataFlow
public abstract class DataFlow
Contains factory methods to create dataflow actors and starting them.
| Field Summary | |
|---|---|
static java.lang.ThreadLocal<groovyx.gpars.group.PGroup> |
activeParallelGroup
Maps threads/tasks to parallel groups they belong to |
static groovyx.gpars.group.PGroup |
DATA_FLOW_GROUP
The parallel group used by all Dataflow Concurrency actors by default. |
| Constructor Summary | |
|---|---|
DataFlow()
|
|
| Method Summary | |
|---|---|
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
operator(DataFlowReadChannel input,
DataFlowWriteChannel output,
groovy.lang.Closure code)
Creates an operator using the current parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
operator(DataFlowReadChannel input,
DataFlowWriteChannel output,
int maxForks,
groovy.lang.Closure code)
Creates an operator using the current parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
operator(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
Creates an operator using the current parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
operator(java.util.List inputChannels,
java.util.List outputChannels,
int maxForks,
groovy.lang.Closure code)
Creates an operator using the current parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
operator(java.util.Map channels,
groovy.lang.Closure code)
Creates an operator using the default dataflow parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
prioritySelector(java.util.List inputChannels,
java.util.List outputChannels)
Creates a prioritizing selector using the default dataflow parallel group. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
prioritySelector(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
Creates a prioritizing selector using the default dataflow parallel group Input with lower position index have higher priority. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
prioritySelector(java.util.Map channels)
Creates a prioritizing selector using the default dataflow parallel group. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
prioritySelector(java.util.Map channels,
groovy.lang.Closure code)
Creates a prioritizing selector using the default dataflow parallel group Input with lower position index have higher priority. |
static groovyx.gpars.group.PGroup |
retrieveCurrentDFPGroup()
Retrieves the thread-local value of the active PGroup or the default DataFlowGroup |
static Select<?> |
select(DataFlowReadChannel<?>... channels)
Creates a select using the default dataflow parallel group. |
static Select<?> |
select(java.util.List<DataFlowReadChannel> channels)
Creates a select using the default dataflow parallel group. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
selector(java.util.List inputChannels,
java.util.List outputChannels)
Creates a selector using the default dataflow parallel group. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
selector(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
Creates a selector using the default dataflow parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
selector(java.util.Map channels)
Creates a selector using the default dataflow parallel group. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
selector(java.util.Map channels,
groovy.lang.Closure code)
Creates a selector using the default dataflow parallel group |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
splitter(DataFlowReadChannel inputChannel,
java.util.List<DataFlowWriteChannel> outputChannels)
Creates a splitter copying its single input channel into all of its output channels. |
static groovyx.gpars.dataflow.operator.DataFlowProcessor |
splitter(DataFlowReadChannel inputChannel,
java.util.List<DataFlowWriteChannel> outputChannels,
int maxForks)
Creates a splitter copying its single input channel into all of its output channels. |
static Actor |
start(groovy.lang.Closure code)
Creates a new instance of SingleRunActor to run the supplied code. |
static DataFlowVariable |
task(java.util.concurrent.Callable callable)
Creates a new task assigned to a thread from the current parallel group. |
static DataFlowVariable |
task(groovy.lang.Closure code)
Creates a new task assigned to a thread from the default dataflow parallel group. |
static DataFlowVariable |
task(java.lang.Runnable runnable)
Creates a new task assigned to a thread from the current parallel group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final groovyx.gpars.group.PGroup DATA_FLOW_GROUP
public static final java.lang.ThreadLocal<groovyx.gpars.group.PGroup> activeParallelGroup
| Constructor Detail |
|---|
public DataFlow()
| Method Detail |
|---|
public static groovyx.gpars.group.PGroup retrieveCurrentDFPGroup()
public static Actor start(groovy.lang.Closure code)
code - The actor's body
public static DataFlowVariable task(groovy.lang.Closure code)
code - The task body to run
public static DataFlowVariable task(java.util.concurrent.Callable callable)
callable - The task body to run
public static DataFlowVariable task(java.lang.Runnable runnable)
runnable - The task body to run
public static groovyx.gpars.dataflow.operator.DataFlowProcessor operator(java.util.Map channels,
groovy.lang.Closure code)
channels - A map specifying "inputs" and "outputs" - dataflow channels (instances of the DataFlowQueue or DataFlowVariable classes) to use for inputs and outputscode - The operator's body to run each time all inputs have a value to read
public static groovyx.gpars.dataflow.operator.DataFlowProcessor operator(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for outputcode - The operator's body to run each time all inputs have a value to read
public static groovyx.gpars.dataflow.operator.DataFlowProcessor operator(java.util.List inputChannels,
java.util.List outputChannels,
int maxForks,
groovy.lang.Closure code)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for outputmaxForks - Number of parallel threads running operator's body, defaults to 1code - The operator's body to run each time all inputs have a value to read
public static groovyx.gpars.dataflow.operator.DataFlowProcessor operator(DataFlowReadChannel input,
DataFlowWriteChannel output,
groovy.lang.Closure code)
input - a dataflow channel to use for inputoutput - a dataflow channel to use for outputcode - The operator's body to run each time all inputs have a value to read
public static groovyx.gpars.dataflow.operator.DataFlowProcessor operator(DataFlowReadChannel input,
DataFlowWriteChannel output,
int maxForks,
groovy.lang.Closure code)
input - a dataflow channel to use for inputoutput - a dataflow channel to use for outputmaxForks - Number of parallel threads running operator's body, defaults to 1code - The operator's body to run each time all inputs have a value to read
public static groovyx.gpars.dataflow.operator.DataFlowProcessor selector(java.util.Map channels,
groovy.lang.Closure code)
channels - A map specifying "inputs" and "outputs" - dataflow channels (instances of the DataFlowQueue or DataFlowVariable classes) to use for inputs and outputscode - The selector's body to run each time a value is available in any of the inputs channels
public static groovyx.gpars.dataflow.operator.DataFlowProcessor selector(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for outputcode - The selector's body to run each time a value is available in any of the inputs channels
public static groovyx.gpars.dataflow.operator.DataFlowProcessor selector(java.util.Map channels)
channels - A map specifying "inputs" and "outputs" - dataflow channels (instances of the DataFlowQueue or DataFlowVariable classes) to use for inputs and outputs
public static groovyx.gpars.dataflow.operator.DataFlowProcessor selector(java.util.List inputChannels,
java.util.List outputChannels)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for output
public static groovyx.gpars.dataflow.operator.DataFlowProcessor prioritySelector(java.util.Map channels,
groovy.lang.Closure code)
channels - A map specifying "inputs" and "outputs" - dataflow channels (instances of the DataFlowQueue or DataFlowVariable classes) to use for inputs and outputscode - The selector's body to run each time a value is available in any of the inputs channels
public static groovyx.gpars.dataflow.operator.DataFlowProcessor prioritySelector(java.util.List inputChannels,
java.util.List outputChannels,
groovy.lang.Closure code)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for outputcode - The selector's body to run each time a value is available in any of the inputs channels
public static groovyx.gpars.dataflow.operator.DataFlowProcessor prioritySelector(java.util.Map channels)
channels - A map specifying "inputs" and "outputs" - dataflow channels (instances of the DataFlowQueue or DataFlowVariable classes) to use for inputs and outputs
public static groovyx.gpars.dataflow.operator.DataFlowProcessor prioritySelector(java.util.List inputChannels,
java.util.List outputChannels)
inputChannels - dataflow channels to use for inputoutputChannels - dataflow channels to use for output
public static groovyx.gpars.dataflow.operator.DataFlowProcessor splitter(DataFlowReadChannel inputChannel,
java.util.List<DataFlowWriteChannel> outputChannels)
inputChannel - The channel to read values fromoutputChannels - A list of channels to output to
public static groovyx.gpars.dataflow.operator.DataFlowProcessor splitter(DataFlowReadChannel inputChannel,
java.util.List<DataFlowWriteChannel> outputChannels,
int maxForks)
inputChannel - The channel to read values fromoutputChannels - A list of channels to output tomaxForks - Number of threads running the splitter's body, defaults to 1
public static Select<?> select(DataFlowReadChannel<?>... channels)
channels - Dataflow variables or streams to wait for values on
public static Select<?> select(java.util.List<DataFlowReadChannel> channels)
channels - Dataflow variables or streams to wait for values on
|
Copyright © 2008–2010 Václav Pech. All Rights Reserved. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||