org.codehaus.gpars

groovyx.gpars.dataflow.expression
[Java] Class DataflowExpression

java.lang.Object
  groovyx.gpars.serial.WithSerialId
      groovyx.gpars.dataflow.expression.DataflowExpression
All Implemented Interfaces:
DataflowReadChannel, groovy.lang.GroovyObject

@java.lang.SuppressWarnings/**
public abstract class DataflowExpression
extends WithSerialId

The base class for all dataflow elements.

Authors:
Alex Tkachman, Vaclav Pech


Nested Class Summary
static class DataflowExpression.BindDataflow

class DataflowExpression.DataflowExpressionsCollector

private static class DataflowExpression.TransformMany

private static class DataflowExpression.TransformOne

private static class DataflowExpression.WaitingThread

 
Field Summary
private static java.lang.String ATTACHMENT

private static java.lang.String A_DATAFLOW_VARIABLE_CAN_ONLY_BE_ASSIGNED_ONCE_ONLY_RE_ASSIGNMENTS_TO_AN_EQUAL_VALUE_ARE_ALLOWED

private static java.lang.String CANNOT_FIRE_BIND_ERRORS_THE_THREAD_HAS_BEEN_INTERRUPTED

private static java.lang.String RESULT

protected static int S_INITIALIZED

protected static int S_INITIALIZING

protected static int S_NOT_INITIALIZED

private static DataflowExpression.WaitingThread dummyWaitingThread

Check if value has been set already for this expression

protected java.lang.Throwable error

private DataflowChannelEventOrchestrator eventManager

private groovy.lang.MetaClass metaClass

private static long serialVersionUID

protected java.util.concurrent.atomic.AtomicInteger state

protected java.lang.Object value

Possible states

private java.util.concurrent.atomic.AtomicReference waiting

 
Fields inherited from class WithSerialId
serialHandle, serialVersionUID
 
Constructor Summary
DataflowExpression()

 
Method Summary
protected java.lang.Object DataflowExpression()

void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)

void bind(java.lang.Object value)

void bindError(java.lang.Throwable e)

void bindSafely(java.lang.Object value)

Assigns a value to the variable.

void bindUnique(java.lang.Object value)

Performs the actual bind operation, unblocks all blocked threads and informs all asynchronously waiting actors.

DataflowReadChannel chainWith(groovy.lang.Closure closure)

DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)

DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)

DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)

void choice(java.util.List outputs, groovy.lang.Closure code)

void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)

void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)

void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

private DataflowChannelEventOrchestrator createEventManager()

private void doBind(java.lang.Object value)

protected void doBindImpl(java.lang.Object value)

void doBindRemote(java.util.UUID hostId, java.lang.Object message)

Binds the value after receiving a bing message over the wire

private Promise doThenForkAndJoin(PGroup group, Pool pool, groovy.lang.Closure[] closures)

protected java.lang.Object evaluate()

Returns either standard property of the expression or creates an expression, which will request given property when the receiver becomes available

DataflowReadChannel filter(groovy.lang.Closure closure)

DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)

DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)

DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)

DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)

private void fireBindError(java.lang.Object value, boolean unique)

private void fireBindError(java.lang.Throwable e)

private void fireOnMessage(java.lang.Object value)

BindErrorListenerManager getBindErrorManager()

DataflowChannelEventListenerManager getEventManager()

groovy.lang.MetaClass getMetaClass()

java.lang.Object getProperty(java.lang.String propertyName)

Listener for availability of data flow expressions we depend on.

java.lang.Object getVal()

java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)

Reads the value of the variable.

void getValAsync(MessageStream callback)

void getValAsync(java.lang.Object attachment, MessageStream callback)

private static void handleInterruption(java.util.concurrent.atomic.AtomicBoolean newWaiting)

void into(DataflowWriteChannel target)

void into(Pool pool, DataflowWriteChannel target)

void into(PGroup group, DataflowWriteChannel target)

void into(java.util.Map params, DataflowWriteChannel target)

void into(Pool pool, java.util.Map params, DataflowWriteChannel target)

void into(PGroup group, java.util.Map params, DataflowWriteChannel target)

java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)

boolean isBound()

void join()

Blocks, if the value has not been assigned yet to the DataflowVariable

void join(long timeout, java.util.concurrent.TimeUnit units)

int length()

DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)

DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)

DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)

private void notifyRemote(java.util.UUID hostId)

DataflowReadChannel or(groovy.lang.Closure closure)

void or(DataflowWriteChannel target)

DataflowExpression poll()

Retrieves the bound value.

Promise rightShift(groovy.lang.Closure closure)

Schedule closure to be executed by pooled actor after data becomes available.

protected void scheduleCallback(java.lang.Object attachment, MessageStream callback)

Sends the result back to the actor, which is waiting asynchronously for the value to be bound.

void separate(java.util.List outputs, groovy.lang.Closure code)

void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)

void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)

void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)

void setMetaClass(groovy.lang.MetaClass metaClass)

void setProperty(java.lang.String propertyName, java.lang.Object newValue)

void split(DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(java.util.List targets)

void split(Pool pool, java.util.List targets)

void split(PGroup group, java.util.List targets)

void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)

void split(java.util.Map params, java.util.List targets)

void split(Pool pool, java.util.Map params, java.util.List targets)

void split(PGroup group, java.util.Map params, java.util.List targets)

protected void subscribe()

Evaluates the expression after the ones we depend on are ready

protected void subscribe(DataflowExpression.DataflowExpressionsCollector listener)

DataflowReadChannel tap(DataflowWriteChannel target)

DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)

DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)

DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)

DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)

DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)

Promise then(groovy.lang.Closure closure)

Promise then(Pool pool, groovy.lang.Closure closure)

Promise then(PGroup group, groovy.lang.Closure closure)

Promise thenForkAndJoin(groovy.lang.Closure... closures)

Promise thenForkAndJoin(Pool pool, groovy.lang.Closure... closures)

Promise thenForkAndJoin(PGroup group, groovy.lang.Closure... closures)

java.lang.String toString()

static DataflowExpression transform(java.lang.Object another, groovy.lang.Closure closure)

A utility method to call at the very end of constructors of derived expressions.

void whenBound(groovy.lang.Closure closure)

Schedule closure to be executed by pooled actor after data becomes available.

void whenBound(Pool pool, groovy.lang.Closure closure)

Send the bound data to provided stream when it becomes available

void whenBound(PGroup group, groovy.lang.Closure closure)

void whenBound(MessageStream stream)

Schedule closure to be executed after data becomes available.

void wheneverBound(groovy.lang.Closure closure)

Send all pieces of data bound in the future to the provided stream when it becomes available.

void wheneverBound(MessageStream stream)

 
Methods inherited from class WithSerialId
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace
 

Field Detail

ATTACHMENT

private static final java.lang.String ATTACHMENT


A_DATAFLOW_VARIABLE_CAN_ONLY_BE_ASSIGNED_ONCE_ONLY_RE_ASSIGNMENTS_TO_AN_EQUAL_VALUE_ARE_ALLOWED

private static final java.lang.String A_DATAFLOW_VARIABLE_CAN_ONLY_BE_ASSIGNED_ONCE_ONLY_RE_ASSIGNMENTS_TO_AN_EQUAL_VALUE_ARE_ALLOWED


CANNOT_FIRE_BIND_ERRORS_THE_THREAD_HAS_BEEN_INTERRUPTED

private static final java.lang.String CANNOT_FIRE_BIND_ERRORS_THE_THREAD_HAS_BEEN_INTERRUPTED


RESULT

private static final java.lang.String RESULT


S_INITIALIZED

protected static final int S_INITIALIZED


S_INITIALIZING

protected static final int S_INITIALIZING


S_NOT_INITIALIZED

protected static final int S_NOT_INITIALIZED


dummyWaitingThread

private static final DataflowExpression.WaitingThread dummyWaitingThread
Check if value has been set already for this expression
Returns:
true if bound already


error

protected java.lang.Throwable error


eventManager

private DataflowChannelEventOrchestrator eventManager


metaClass

private groovy.lang.MetaClass metaClass


serialVersionUID

private static final long serialVersionUID


state

protected final java.util.concurrent.atomic.AtomicInteger state


value

@java.lang.SuppressWarnings* Possible states
protected java.lang.Object value
Possible states


waiting

private final java.util.concurrent.atomic.AtomicReference waiting


 
Constructor Detail

DataflowExpression

DataflowExpression()


 
Method Detail

DataflowExpression

protected java.lang.Object DataflowExpression()


binaryChoice

@java.lang.Overrideparameters.put("outputs", asList(trueBranch, falseBranch));
public void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


bind

public final void bind(java.lang.Object value)


bindError

public final void bindError(java.lang.Throwable e)


bindSafely

public final void bindSafely(java.lang.Object value)
Assigns a value to the variable. Can only be invoked once on each instance of DataflowVariable. Allows attempts to bind to equal values.
Parameters:
value - The value to assign


bindUnique

public final void bindUnique(java.lang.Object value)
Performs the actual bind operation, unblocks all blocked threads and informs all asynchronously waiting actors.
Parameters:
value - The value to assign


chainWith

@java.lang.Override
public final DataflowReadChannel chainWith(groovy.lang.Closure closure)


chainWith

@java.lang.Override}
public final DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)


chainWith

@java.lang.SuppressWarnings}
@java.lang.Override
public DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)


chainWith

@java.lang.Overridepublic DataflowReadChannel filter(final Pool pool, final Closure closure) {
public final DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)


chainWith

@java.lang.Overridepublic DataflowReadChannel filter(final PGroup group, final Closure closure) {
public final DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)


chainWith

@java.lang.SuppressWarningspublic DataflowReadChannel filter(final Map params, final Closure closure) {
@java.lang.Overridereturn chainWith(params, new FilterClosure(closure));
public DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)


choice

@java.lang.Overrideparameters.put("outputs", asList(outputs));
public void choice(java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


createEventManager

private DataflowChannelEventOrchestrator createEventManager()


doBind

private void doBind(java.lang.Object value)


doBindImpl

protected void doBindImpl(java.lang.Object value)


doBindRemote

public final void doBindRemote(java.util.UUID hostId, java.lang.Object message)
Binds the value after receiving a bing message over the wire
Parameters:
hostId - Id of the bind originator host
message - The value to bind


doThenForkAndJoin

private Promise doThenForkAndJoin(PGroup group, Pool pool, groovy.lang.Closure[] closures)


evaluate

protected java.lang.Object evaluate()
Returns either standard property of the expression or creates an expression, which will request given property when the receiver becomes available
Parameters:
propertyName - The name of the property to retrieve
Returns:
The property value, instance of DataflowGetPropertyExpression


filter

@java.lang.Override
public DataflowReadChannel filter(groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)


filter

@java.lang.Overrideprotected void doRun(final T argument) {
public DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)


fireBindError

private void fireBindError(java.lang.Object value, boolean unique)


fireBindError

private void fireBindError(java.lang.Throwable e)


fireOnMessage

private void fireOnMessage(java.lang.Object value)


getBindErrorManager

public BindErrorListenerManager getBindErrorManager()


getEventManager

@java.lang.Overridethrow new IllegalStateException(CANNOT_FIRE_BIND_ERRORS_THE_THREAD_HAS_BEEN_INTERRUPTED, ex);
public DataflowChannelEventListenerManager getEventManager()


getMetaClass

@java.lang.Overridereturn dataflowExpression.value;
public final groovy.lang.MetaClass getMetaClass()


getProperty

@java.lang.Overridefinal class DataflowExpressionsCollector extends MessageStream {
public final java.lang.Object getProperty(java.lang.String propertyName)
Listener for availability of data flow expressions we depend on. Keeps a counter of monitored dataflow expressions. The counter gets decreased with each expression becoming available. Once the counter reaches 0, the Collector evaluates itself and becomes bound to the resulting value.


getVal

@java.lang.Overridewhile (state.get() != S_INITIALIZED) {
public java.lang.Object getVal()


getVal

@java.lang.Overridefinal long toWait = endNano - System.nanoTime();
public java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)
Reads the value of the variable. Blocks up to given timeout, if the value has not been assigned yet.
throws:
InterruptedException If the current thread gets interrupted while waiting for the variable to be bound
Parameters:
timeout - The timeout value
units - Units for the timeout
Returns:
The actual value


getValAsync

@java.lang.Override* @param callback   An actor to send the bound value plus the supplied index to.
public void getValAsync(MessageStream callback)


getValAsync

@java.lang.Overridebreak;
public void getValAsync(java.lang.Object attachment, MessageStream callback)


handleInterruption

private static void handleInterruption(java.util.concurrent.atomic.AtomicBoolean newWaiting)


into

@java.lang.Override
public void into(DataflowWriteChannel target)


into

@java.lang.Overrideprotected void doRun(final T argument) {
public void into(Pool pool, DataflowWriteChannel target)


into

@java.lang.Override
public void into(PGroup group, DataflowWriteChannel target)


into

@java.lang.Override
public void into(java.util.Map params, DataflowWriteChannel target)


into

@java.lang.Override
public void into(Pool pool, java.util.Map params, DataflowWriteChannel target)


into

@java.lang.Override
public void into(PGroup group, java.util.Map params, DataflowWriteChannel target)


invokeMethod

@java.lang.Override
public final java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)


isBound

@java.lang.Override*
public final boolean isBound()


join

public final void join()
Blocks, if the value has not been assigned yet to the DataflowVariable
throws:
InterruptedException If the current thread gets interrupted while waiting for the variable to be bound


join

public final void join(long timeout, java.util.concurrent.TimeUnit units)


length

@java.lang.OverridegetValAsync(null, callback);
public final int length()


merge

@java.lang.Overridefinal List inputs = new ArrayList();
public DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override}
public DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override}
public DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override}
public DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Override}
public DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.SuppressWarnings}
@java.lang.Override
public DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Overridefinal Collection> inputs = new ArrayList>();
public DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Overrideparameters.put("outputs", asList(result));
public DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.SuppressWarnings
@java.lang.Override
public DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


notifyRemote

private void notifyRemote(java.util.UUID hostId)


or

@java.lang.Override
public DataflowReadChannel or(groovy.lang.Closure closure)


or

@java.lang.Override
public void or(DataflowWriteChannel target)


poll

@java.lang.Override}
public final DataflowExpression poll()
Retrieves the bound value. Returns null, if no value is available.
Returns:
The value bound to the DFV or null


rightShift

@java.lang.Override
public final Promise rightShift(groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
pool - The thread pool to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.


scheduleCallback

@java.lang.SuppressWarnings* @param closure closure to execute when data becomes available. The closure should take at most one argument.
protected void scheduleCallback(java.lang.Object attachment, MessageStream callback)
Sends the result back to the actor, which is waiting asynchronously for the value to be bound. The message will either be a map holding the attachment under the 'attachment' key and the actual bound value under the 'result' key, or it will be the result itself if the callback doesn't care about the index.
Parameters:
attachment - An arbitrary object identifying the request
callback - The actor to send the message to


separate

@java.lang.Overrideparameters.put("outputs", asList(outputs));
public void separate(java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Overrideprivate volatile DataflowChannelEventOrchestrator eventManager;
public void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override}
public void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override
public void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override}
public void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override}
public void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


setMetaClass

@java.lang.Overridereturn this;
public final void setMetaClass(groovy.lang.MetaClass metaClass)


setProperty

@java.lang.Overridereturn element;
public final void setProperty(java.lang.String propertyName, java.lang.Object newValue)


split

@java.lang.Overrideprotected void doRun(final T argument) {
public void split(DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override});
public void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Overridesplit(Dataflow.retrieveCurrentDFPGroup(), params, target1, target2);
public void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Overridesplit(new DefaultPGroup(pool), params, target1, target2);
public void split(java.util.List targets)


split

@java.lang.Overridesplit(group, params, asList(target1, target2));
public void split(Pool pool, java.util.List targets)


split

@java.lang.Overridesplit(Dataflow.retrieveCurrentDFPGroup(), params, targets);
public void split(PGroup group, java.util.List targets)


split

@java.lang.Overrideprotected void doRun(final T argument) {
public void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override});
public void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Overridereturn tap(Dataflow.retrieveCurrentDFPGroup(), target);
public void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Overridereturn tap(new DefaultPGroup(pool), target);
public void split(java.util.Map params, java.util.List targets)


split

@java.lang.Overridepublic DataflowReadChannel tap(final PGroup group, final DataflowWriteChannel target) {
public void split(Pool pool, java.util.Map params, java.util.List targets)


split

@java.lang.Overrideresult.leftShift(argument);
public void split(PGroup group, java.util.Map params, java.util.List targets)


subscribe

protected final void subscribe()
Evaluates the expression after the ones we depend on are ready
Returns:
The value to bind


subscribe

protected void subscribe(DataflowExpression.DataflowExpressionsCollector listener)


tap

@java.lang.Override
public DataflowReadChannel tap(DataflowWriteChannel target)


tap

@java.lang.Override@SuppressWarnings({"ClassReferencesSubclass"})
public DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)


tap

@java.lang.SuppressWarnings
@java.lang.Override
public DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)


tap

@java.lang.Override}
public DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)


tap

@java.lang.Override}
public DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)


tap

@java.lang.SuppressWarnings}
@java.lang.Override
public DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)


then

@java.lang.Override* @param closure closure to execute when data becomes available. The closure should take at most one argument.
public final Promise then(groovy.lang.Closure closure)


then

@java.lang.Override*
public final Promise then(Pool pool, groovy.lang.Closure closure)


then

@java.lang.Override* @param pool     The thread pool to use for task scheduling for asynchronous message delivery
public final Promise then(PGroup group, groovy.lang.Closure closure)


thenForkAndJoin

@java.lang.SuppressWarnings* @param closures closure to execute when data becomes available. The closure should take at most one argument.
public final Promise thenForkAndJoin(groovy.lang.Closure... closures)


thenForkAndJoin

@java.lang.SuppressWarningsgroup.whenAllBound(partialResults,
public final Promise thenForkAndJoin(Pool pool, groovy.lang.Closure... closures)


thenForkAndJoin

@java.lang.SuppressWarnings
public final Promise thenForkAndJoin(PGroup group, groovy.lang.Closure... closures)


toString

@java.lang.SuppressWarningsprivate static final long serialVersionUID = 4115456542358280855L;
@java.lang.Overrideprivate final Closure closure;
public java.lang.String toString()


transform

public static DataflowExpression transform(java.lang.Object another, groovy.lang.Closure closure)
A utility method to call at the very end of constructors of derived expressions. Creates and subscribes a listener to monitor the expression


whenBound

@java.lang.Override}
public final void whenBound(groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
group - The PGroup to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.


whenBound

@java.lang.Override* Schedule closure to be executed after data became available.
public void whenBound(Pool pool, groovy.lang.Closure closure)
Send the bound data to provided stream when it becomes available
Parameters:
stream - stream where to send result


whenBound

@java.lang.Override
public final void whenBound(PGroup group, groovy.lang.Closure closure)


whenBound

@java.lang.Override
public final void whenBound(MessageStream stream)
Schedule closure to be executed after data becomes available. It is important to notice that even if the expression is already bound the execution of closure will not happen immediately but will be scheduled.
Parameters:
pool - The thread pool to use for task scheduling for asynchronous message delivery
closure - closure to execute when data becomes available. The closure should take at most one argument.
Returns:
A promise for the results of the supplied closure. This allows for chaining of then() method calls.


wheneverBound

@java.lang.OverridewhenBound(group, new ThenMessagingRunnable(result, closure));
public final void wheneverBound(groovy.lang.Closure closure)
Send all pieces of data bound in the future to the provided stream when it becomes available.
Parameters:
stream - stream where to send result


wheneverBound

@java.lang.Overridepublic final  DataflowReadChannel chainWith(final Pool pool, final Map params, final Closure closure) {
public final void wheneverBound(MessageStream stream)


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.