T - The type of messages to pass through the streampublic class DataflowStreamReadAdapter<T> extends java.lang.Object implements DataflowReadChannel<T>
| Modifier and Type | Field and Description |
|---|---|
private StreamCore<T> |
asyncHead |
private DataflowChannelEventOrchestrator<T> |
eventManager |
private StreamCore<T> |
head |
| Constructor and Description |
|---|
DataflowStreamReadAdapter(StreamCore<T> stream)
Creates a new adapter
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<DataflowVariable<T>> |
allUnprocessedDFVs() |
void |
binaryChoice(DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
void |
binaryChoice(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
void |
binaryChoice(PGroup group,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
void |
binaryChoice(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
void |
binaryChoice(Pool pool,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
void |
binaryChoice(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
Directs the output to one of the two output channels depending on the boolean result of the provided closure.
|
<V> DataflowReadChannel<V> |
chainWith(groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
<V> DataflowReadChannel<V> |
chainWith(java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
<V> DataflowReadChannel<V> |
chainWith(PGroup group,
groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
<V> DataflowReadChannel<V> |
chainWith(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
<V> DataflowReadChannel<V> |
chainWith(Pool pool,
groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
<V> DataflowReadChannel<V> |
chainWith(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
void |
choice(java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
void |
choice(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
void |
choice(PGroup group,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
void |
choice(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
void |
choice(Pool pool,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
void |
choice(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
Directs the output to one of the output channels depending on the int result of the provided closure.
|
DataflowReadChannel<T> |
filter(groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
DataflowReadChannel<T> |
filter(java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
DataflowReadChannel<T> |
filter(PGroup group,
groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
DataflowReadChannel<T> |
filter(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
DataflowReadChannel<T> |
filter(Pool pool,
groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
DataflowReadChannel<T> |
filter(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
groovy.lang.Closure<java.lang.Boolean> closure)
Creates and attaches a new operator that will filter data using the provided closure
|
private void |
fireOnMessage(T value) |
DataflowChannelEventListenerManager<T> |
getEventManager()
Retrieves the event manager object of this channel
|
T |
getVal()
Reads the current value of the channel.
|
T |
getVal(long timeout,
java.util.concurrent.TimeUnit units)
Reads the current value of the channel.
|
void |
getValAsync(MessageStream callback)
Asynchronously retrieves the value from the channel.
|
void |
getValAsync(java.lang.Object attachment,
MessageStream callback)
Asynchronously retrieves the value from the channel.
|
void |
into(DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
void |
into(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
void |
into(PGroup group,
DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
void |
into(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
void |
into(Pool pool,
DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
void |
into(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
boolean |
isBound()
Check if value has been set already for this expression
|
java.util.Iterator<T> |
iterator() |
int |
length()
Returns the current size of the buffer
|
<V> DataflowReadChannel<V> |
merge(DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(PGroup group,
DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(PGroup group,
java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(Pool pool,
DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(Pool pool,
java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowReadChannel<java.lang.Object> other,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
<V> DataflowReadChannel<V> |
merge(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowReadChannel<java.lang.Object>> others,
groovy.lang.Closure<V> closure)
Merges channels together as inputs for a single dataflow operator.
|
private void |
moveAsyncHead() |
private void |
moveHead() |
<V> DataflowReadChannel<V> |
or(groovy.lang.Closure<V> closure)
Creates and attaches a new operator processing values from the channel
|
void |
or(DataflowWriteChannel<T> target)
Makes the output of the current channel to be an input for the specified channel
|
DataflowExpression<T> |
poll()
Retrieves the value at the head of the buffer.
|
<V> Promise<V> |
rightShift(groovy.lang.Closure<V> closure)
Schedule closure to be executed after data became available.
|
void |
separate(java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
void |
separate(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
void |
separate(PGroup group,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
void |
separate(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
void |
separate(Pool pool,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
void |
separate(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
Allows the closure to output different values to different output channels.
|
private boolean |
shouldReportTimeout() |
void |
split(DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
void |
split(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
void |
split(PGroup group,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(PGroup group,
java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
void |
split(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
void |
split(Pool pool,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(Pool pool,
java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
void |
split(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
Splits the output of the current channel to be an input for the specified channels
|
void |
split(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> targets)
Makes the output of the current channel to be an input for the specified channels
|
DataflowReadChannel<T> |
tap(DataflowWriteChannel<T> target)
Taps into the pipeline.
|
DataflowReadChannel<T> |
tap(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Taps into the pipeline.
|
DataflowReadChannel<T> |
tap(PGroup group,
DataflowWriteChannel<T> target)
Taps into the pipeline.
|
DataflowReadChannel<T> |
tap(PGroup group,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Taps into the pipeline.
|
DataflowReadChannel<T> |
tap(Pool pool,
DataflowWriteChannel<T> target)
Taps into the pipeline.
|
DataflowReadChannel<T> |
tap(Pool pool,
java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
Taps into the pipeline.
|
<V> Promise<V> |
then(groovy.lang.Closure<V> closure)
Schedule closure to be executed after data became available.
|
<V> Promise<V> |
then(PGroup group,
groovy.lang.Closure<V> closure)
Schedule closure to be executed after data becomes available.
|
<V> Promise<V> |
then(Pool pool,
groovy.lang.Closure<V> closure)
Schedule closure to be executed after data becomes available.
|
java.lang.String |
toString() |
<V> void |
whenBound(groovy.lang.Closure<V> closure)
Schedule closure to be executed after data becomes available.
|
void |
whenBound(MessageStream stream)
Send the bound data to provided stream when it becomes available
|
<V> void |
whenBound(PGroup group,
groovy.lang.Closure<V> closure)
Schedule closure to be executed after data becomes available.
|
<V> void |
whenBound(Pool pool,
groovy.lang.Closure<V> closure)
Schedule closure to be executed by pooled actor after data becomes available.
|
<V> void |
wheneverBound(groovy.lang.Closure<V> closure)
Send all pieces of data bound in the future to the provided stream when it becomes available.
|
void |
wheneverBound(MessageStream stream)
Send all pieces of data bound in the future to the provided stream when it becomes available.
|
private StreamCore<T> head
private StreamCore<T> asyncHead
private volatile DataflowChannelEventOrchestrator<T> eventManager
public DataflowStreamReadAdapter(StreamCore<T> stream)
stream - The stream to wrappublic java.util.Iterator<T> iterator()
public final java.lang.String toString()
toString in class java.lang.Objectpublic T getVal() throws java.lang.InterruptedException
DataflowReadChannelgetVal in interface DataflowReadChannel<T>java.lang.InterruptedException - If the current thread gets interrupted while waiting for the channel to be boundpublic T getVal(long timeout, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException
DataflowReadChannelgetVal in interface DataflowReadChannel<T>timeout - The timeout valueunits - Units for the timeoutjava.lang.InterruptedException - If the current thread gets interrupted while waiting for the channel to be boundprivate boolean shouldReportTimeout()
public void getValAsync(MessageStream callback)
DataflowReadChannelgetValAsync in interface DataflowReadChannel<T>callback - An actor to send the bound value to.public void getValAsync(java.lang.Object attachment,
MessageStream callback)
DataflowReadChannelgetValAsync in interface DataflowReadChannel<T>attachment - arbitrary non-null attachment if reader needs better identification of resultcallback - An actor to send the bound value plus the supplied index to.public <V> Promise<V> rightShift(groovy.lang.Closure<V> closure)
DataflowReadChannelrightShift() redefines the >> operator so you can write df >> {println it} instead of df.whenBound{println it}
rightShift in interface DataflowReadChannel<T>closure - closure to execute when data becomes available. The closure should take at most one argument.public <V> void whenBound(groovy.lang.Closure<V> closure)
DataflowReadChannelwhenBound in interface DataflowReadChannel<T>closure - closure to execute when data becomes available. The closure should take at most one argument.public <V> void whenBound(Pool pool, groovy.lang.Closure<V> closure)
whenBound in interface DataflowReadChannel<T>pool - The thread pool to use for task scheduling for asynchronous message deliveryclosure - closure to execute when data becomes available. The closure should take at most one argument.public <V> void whenBound(PGroup group, groovy.lang.Closure<V> closure)
DataflowReadChannelwhenBound in interface DataflowReadChannel<T>group - The PGroup to use for task scheduling for asynchronous message deliveryclosure - closure to execute when data becomes available. The closure should take at most one argument.public void whenBound(MessageStream stream)
DataflowReadChannelwhenBound in interface DataflowReadChannel<T>stream - stream where to send resultpublic final <V> Promise<V> then(groovy.lang.Closure<V> closure)
then in interface DataflowReadChannel<T>closure - closure to execute when data becomes available. The closure should take at most one argument.public <V> Promise<V> then(Pool pool, groovy.lang.Closure<V> closure)
then in interface DataflowReadChannel<T>pool - The thread pool to use for task scheduling for asynchronous message deliveryclosure - closure to execute when data becomes available. The closure should take at most one argument.public <V> Promise<V> then(PGroup group, groovy.lang.Closure<V> closure)
then in interface DataflowReadChannel<T>group - The PGroup to use for task scheduling for asynchronous message deliveryclosure - closure to execute when data becomes available. The closure should take at most one argument.public <V> void wheneverBound(groovy.lang.Closure<V> closure)
SelectableChannelwheneverBound in interface SelectableChannel<T>closure - closure to execute when data becomes available. The closure should take at most one argument.public void wheneverBound(MessageStream stream)
SelectableChannelwheneverBound in interface SelectableChannel<T>stream - stream where to send resultpublic final <V> DataflowReadChannel<V> chainWith(groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closureclosure - The function to invoke on all incoming values as part of the new operator's bodypublic final <V> DataflowReadChannel<V> chainWith(Pool pool, groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closurepool - The thread pool to useclosure - The function to invoke on all incoming values as part of the new operator's bodypublic <V> DataflowReadChannel<V> chainWith(PGroup group, groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closuregroup - The PGroup to useclosure - The function to invoke on all incoming values as part of the new operator's bodypublic final <V> DataflowReadChannel<V> chainWith(java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closureparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The function to invoke on all incoming values as part of the new operator's bodypublic final <V> DataflowReadChannel<V> chainWith(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closurepool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The function to invoke on all incoming values as part of the new operator's bodypublic <V> DataflowReadChannel<V> chainWith(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<V> closure)
DataflowReadChannelchainWith in interface DataflowReadChannel<T>V - The type of values returned from the supplied closuregroup - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The function to invoke on all incoming values as part of the new operator's bodypublic <V> DataflowReadChannel<V> or(groovy.lang.Closure<V> closure)
DataflowReadChannelor in interface DataflowReadChannel<T>V - The type of values returned from the supplied closureclosure - The function to invoke on all incoming values as part of the new operator's bodypublic DataflowReadChannel<T> filter(groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>closure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic DataflowReadChannel<T> filter(Pool pool, groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>pool - The thread pool to useclosure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic DataflowReadChannel<T> filter(PGroup group, groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>group - The PGroup to useclosure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic DataflowReadChannel<T> filter(java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic DataflowReadChannel<T> filter(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic DataflowReadChannel<T> filter(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, groovy.lang.Closure<java.lang.Boolean> closure)
DataflowReadChannelfilter in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)closure - The filter function to invoke on all incoming values to decide whether to pass the value on or notpublic void into(DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>target - The channel to copy data intopublic void into(Pool pool, DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>pool - The thread pool to usetarget - The channel to copy data intopublic void into(PGroup group, DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>group - The PGroup to usetarget - The channel to copy data intopublic void into(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to copy data intopublic void into(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to copy data intopublic void into(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target)
DataflowReadChannelinto in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to copy data intopublic void or(DataflowWriteChannel<T> target)
DataflowReadChannelor in interface DataflowReadChannel<T>target - The channel to copy data intopublic void split(DataflowWriteChannel<T> target1, DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>target1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(Pool pool, DataflowWriteChannel<T> target1, DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>pool - The thread pool to usetarget1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(PGroup group, DataflowWriteChannel<T> target1, DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>group - The PGroup to usetarget1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>targets - The channels to copy data intopublic void split(Pool pool, java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>pool - The thread pool to usetargets - The channels to copy data intopublic void split(PGroup group, java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>group - The PGroup to usetargets - The channels to copy data intopublic void split(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> target1,
DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target1, DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target1, DataflowWriteChannel<T> target2)
DataflowReadChannelsplit in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target1 - The first channel to copy data intotarget2 - The second channel to copy data intopublic void split(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)targets - The channels to copy data intopublic void split(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)targets - The channels to copy data intopublic void split(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<T>> targets)
DataflowReadChannelsplit in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)targets - The channels to copy data intopublic DataflowReadChannel<T> tap(DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>target - The channel to tap data intopublic DataflowReadChannel<T> tap(Pool pool, DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>pool - The thread pool to usetarget - The channel to tap data intopublic DataflowReadChannel<T> tap(PGroup group, DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>group - The PGroup to usetarget - The channel to tap data intopublic DataflowReadChannel<T> tap(java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to tap data intopublic DataflowReadChannel<T> tap(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to tap data intopublic DataflowReadChannel<T> tap(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> target)
DataflowReadChanneltap in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)target - The channel to tap data intopublic <V> DataflowReadChannel<V> merge(DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsother - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(Pool pool, DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelspool - The thread pool to useother - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(PGroup group, DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsgroup - The PGroup to useother - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsothers - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(Pool pool, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelspool - The thread pool to useothers - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(PGroup group, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsgroup - The PGroup to useothers - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(java.util.Map<java.lang.String,java.lang.Object> params, DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)other - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelspool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)other - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, DataflowReadChannel<java.lang.Object> other, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsgroup - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)other - The channel to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)others - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelspool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)others - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public <V> DataflowReadChannel<V> merge(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure)
DataflowReadChannelmerge in interface DataflowReadChannel<T>V - The type of values passed between the channelsgroup - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)others - The channels to merge withclosure - The function to invoke on all incoming values as part of the new operator's body. The number of arguments to the closure must match the number of input channels.public void binaryChoice(DataflowWriteChannel<T> trueBranch, DataflowWriteChannel<T> falseBranch, groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>trueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void binaryChoice(Pool pool, DataflowWriteChannel<T> trueBranch, DataflowWriteChannel<T> falseBranch, groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>pool - The thread pool to usetrueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void binaryChoice(PGroup group, DataflowWriteChannel<T> trueBranch, DataflowWriteChannel<T> falseBranch, groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>group - The PGroup to usetrueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void binaryChoice(java.util.Map<java.lang.String,java.lang.Object> params,
DataflowWriteChannel<T> trueBranch,
DataflowWriteChannel<T> falseBranch,
groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)trueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void binaryChoice(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> trueBranch, DataflowWriteChannel<T> falseBranch, groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)trueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void binaryChoice(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, DataflowWriteChannel<T> trueBranch, DataflowWriteChannel<T> falseBranch, groovy.lang.Closure<java.lang.Boolean> code)
DataflowReadChannelbinaryChoice in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)trueBranch - The channel to send data to if the closure returns truefalseBranch - The channel to send data to if the closure returns truecode - A closure directing data to either the true or the false output branchpublic void choice(java.util.List<DataflowWriteChannel<T>> outputs, groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>outputs - The channels to send data to of the closure returns truecode - A closure returning an index of the output channel to direct the data topublic void choice(Pool pool, java.util.List<DataflowWriteChannel<T>> outputs, groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>pool - The thread pool to useoutputs - The channels to send data to.code - A closure returning an index of the output channel to direct the data topublic void choice(PGroup group, java.util.List<DataflowWriteChannel<T>> outputs, groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>group - The PGroup to useoutputs - The channels to send data to.code - A closure returning an index of the output channel to direct the data topublic void choice(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<T>> outputs,
groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to of the closure returns truecode - A closure returning an index of the output channel to direct the data topublic void choice(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<T>> outputs, groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to.code - A closure returning an index of the output channel to direct the data topublic void choice(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<T>> outputs, groovy.lang.Closure<java.lang.Integer> code)
DataflowReadChannelchoice in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to.code - A closure returning an index of the output channel to direct the data topublic void separate(java.util.List<DataflowWriteChannel<?>> outputs, groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>outputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public void separate(Pool pool, java.util.List<DataflowWriteChannel<?>> outputs, groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>pool - The thread pool to useoutputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public void separate(PGroup group, java.util.List<DataflowWriteChannel<?>> outputs, groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>group - The PGroup to useoutputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public void separate(java.util.Map<java.lang.String,java.lang.Object> params,
java.util.List<DataflowWriteChannel<?>> outputs,
groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>params - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public void separate(Pool pool, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<?>> outputs, groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>pool - The thread pool to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public void separate(PGroup group, java.util.Map<java.lang.String,java.lang.Object> params, java.util.List<DataflowWriteChannel<?>> outputs, groovy.lang.Closure<java.util.List<java.lang.Object>> code)
DataflowReadChannelseparate in interface DataflowReadChannel<T>group - The PGroup to useparams - Additional parameters to initialize the operator with (e.g. listeners or maxForks)outputs - The channels to send data to.code - A closure returning a list of values to pass to the output channels. Values are output to the output channels with identical index.public DataflowChannelEventListenerManager<T> getEventManager()
DataflowReadChannelgetEventManager in interface DataflowReadChannel<T>private void fireOnMessage(T value)
public boolean isBound()
DataflowReadChannelisBound in interface DataflowReadChannel<T>public int length()
length in interface DataflowReadChannel<T>public DataflowExpression<T> poll() throws java.lang.InterruptedException
SelectableChannelpoll in interface SelectableChannel<T>java.lang.InterruptedException - If the current thread is interruptedprotected final java.util.List<DataflowVariable<T>> allUnprocessedDFVs() throws java.lang.InterruptedException
java.lang.InterruptedExceptionprivate void moveHead()
private void moveAsyncHead()