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:
groovy.lang.GroovyObject, DataflowReadChannel

@SuppressWarnings({"UnqualifiedStaticUsage", "CallToSimpleGetterFromWithinClass", "ConstantDeclaredInAbstractClass", "unchecked"})
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

Represents a remote message binding a value to a remoted DataflowExpression

class DataflowExpression.DataflowExpressionsCollector

Listener for availability of data flow expressions we depend on.

private static class DataflowExpression.TransformMany

private static class DataflowExpression.TransformOne

private static class DataflowExpression.WaitingThread

A logical representation of a synchronous or asynchronous request to read the value once it is bound.

 
Field Summary
private static java.lang.String ATTACHMENT

private static java.lang.String RESULT

protected static int S_INITIALIZED

protected static int S_INITIALIZING

protected static int S_NOT_INITIALIZED

Possible states

private static DataflowExpression.WaitingThread dummyWaitingThread

A request chain terminator

protected java.lang.Throwable error

private DataflowChannelEventOrchestrator eventManager

private groovy.lang.MetaClass metaClass

The current metaclass

private static long serialVersionUID

protected java.util.concurrent.atomic.AtomicInteger state

Holds the current state of the variable

protected java.lang.Object value

Holds the actual value.

private java.util.concurrent.atomic.AtomicReference waiting

Points to the head of the chain of requests waiting for a value to be bound

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

 
Method Summary
protected java.lang.Object DataflowExpression()

Creates a new unbound Dataflow Expression

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)

Assigns a value to the variable.

void bindError(java.lang.Throwable e)

void bindSafely(java.lang.Object value)

Assigns a value to the variable.

void bindUnique(java.lang.Object value)

Assigns a value to the variable.

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 void doBind(java.lang.Object value)

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

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

protected java.lang.Object evaluate()

Evaluates the expression after the ones we depend on are ready

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 fireOnMessage(java.lang.Object value)

DataflowChannelEventListenerManager getEventManager()

groovy.lang.MetaClass getMetaClass()

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

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

java.lang.Object getVal()

Reads the value of the variable.

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

Reads the value of the variable.

void getValAsync(MessageStream callback)

Asynchronously retrieves the value of the variable.

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

Used by Dataflow operators.

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)

Invokes the method on itself or creates an expression, which will invoke the method n the bound value, once it is available.

boolean isBound()

Check if value has been set already for this expression

void join()

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

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

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

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)

Sends notifications to all subscribers

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 became 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()

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

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)

Schedule closure to be executed after data became available.

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

Schedule closure to be executed after data becomes available.

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

Schedule closure to be executed after data becomes available.

java.lang.String toString()

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

Transforms values bound eventually to dataflow variables using the supplied closure.

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)

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

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

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

void whenBound(MessageStream stream)

Send the bound data to provided stream when it 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)

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

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

Field Detail

ATTACHMENT

private static final java.lang.String ATTACHMENT


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
Possible states


dummyWaitingThread

private static final DataflowExpression.WaitingThread dummyWaitingThread
A request chain terminator


error

protected java.lang.Throwable error


eventManager

private DataflowChannelEventOrchestrator eventManager


metaClass

private groovy.lang.MetaClass metaClass
The current metaclass


serialVersionUID

private static final long serialVersionUID


state

protected final java.util.concurrent.atomic.AtomicInteger state
Holds the current state of the variable


value

@SuppressWarnings({"InstanceVariableMayNotBeInitialized"})
protected java.lang.Object value
Holds the actual value. Is null before a concrete value is bound to it.


waiting

private final java.util.concurrent.atomic.AtomicReference waiting
Points to the head of the chain of requests waiting for a value to be bound


 
Constructor Detail

DataflowExpression

DataflowExpression()


 
Method Detail

DataflowExpression

protected java.lang.Object DataflowExpression()
Creates a new unbound Dataflow Expression


binaryChoice

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


binaryChoice

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


binaryChoice

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


binaryChoice

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


binaryChoice

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


binaryChoice

@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)
Assigns a value to the variable. Can only be invoked once on each instance of DataflowVariable. Allows attempts to bind to equal values. Throws exception if invoked on an already bound variable.
Parameters:
value - The value to assign


bindError

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


bindSafely

public final void bindSafely(java.lang.Object value)
Assigns a value to the variable. Returns silently if invoked on an already bound variable.
Parameters:
value - The value to assign


bindUnique

public final void bindUnique(java.lang.Object value)
Assigns a value to the variable. Can only be invoked once on each instance of DataflowVariable Doesn't allow attempts to bind to equal values. Throws exception if invoked on an already bound variable.
Parameters:
value - The value to assign


chainWith

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


chainWith

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


chainWith

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


chainWith

@Override
public final DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)


chainWith

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


chainWith

@SuppressWarnings({"ClassReferencesSubclass"})
@Override
public DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)


choice

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


choice

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


choice

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


choice

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


choice

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


choice

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


doBind

private void doBind(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


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


evaluate

protected java.lang.Object evaluate()
Evaluates the expression after the ones we depend on are ready
Returns:
The value to bind


filter

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


filter

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


filter

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


filter

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


filter

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


filter

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


fireOnMessage

private void fireOnMessage(java.lang.Object value)


getEventManager

@Override
public DataflowChannelEventListenerManager getEventManager()


getMetaClass

@Override
public final groovy.lang.MetaClass getMetaClass()


getProperty

@Override
public final java.lang.Object getProperty(java.lang.String propertyName)
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


getVal

@Override
public java.lang.Object getVal()
Reads the value of the variable. Blocks, if the value has not been assigned yet.
throws:
InterruptedException If the current thread gets interrupted while waiting for the variable to be bound
Returns:
The actual value


getVal

@Override
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

@Override
public final void getValAsync(MessageStream callback)
Asynchronously retrieves the value of the variable. Sends the actual value of the variable as a message back the the supplied actor once the value has been bound. The actor can perform other activities or release a thread back to the pool by calling react() waiting for the message with the value of the Dataflow Variable.
Parameters:
callback - An actor to send the bound value to.


getValAsync

@Override
public final void getValAsync(java.lang.Object attachment, MessageStream callback)
Used by Dataflow operators. Asynchronously retrieves the value of the variable. Sends a message back the the supplied MessageStream with a map holding the supplied attachment under the 'attachment' key and the actual value of the variable under the 'result' key once the value has been bound. Attachment is an arbitrary value helping the actor.operator match its request with the reply. The actor/operator can perform other activities or release a thread back to the pool by calling react() waiting for the message with the value of the Dataflow Variable.
Parameters:
attachment - arbitrary non-null attachment if reader needs better identification of result
callback - An actor to send the bound value plus the supplied index to.


handleInterruption

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


into

@Override
public void into(DataflowWriteChannel target)


into

@Override
public void into(Pool pool, DataflowWriteChannel target)


into

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


into

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


into

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


into

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


invokeMethod

@Override
public final java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
Invokes the method on itself or creates an expression, which will invoke the method n the bound value, once it is available.


isBound

@Override
public final boolean isBound()
Check if value has been set already for this expression
Returns:
true if bound already


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)
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
Parameters:
timeout - The timeout value
units - Units for the timeout


length

@Override
public final int length()


merge

@Override
public DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)


merge

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


merge

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


merge

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


merge

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


merge

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


merge

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


merge

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


merge

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


merge

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


merge

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


merge

@SuppressWarnings({"ClassReferencesSubclass"})
@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)
Sends notifications to all subscribers
Parameters:
hostId - The local host id


or

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


or

@Override
public void or(DataflowWriteChannel target)


poll

@Override
public final DataflowExpression poll()
Retrieves the bound value. Returns null, if no value is available.
throws:
InterruptedException If the current thread is interrupted
Returns:
The value bound to the DFV or null


rightShift

@Override
public final Promise rightShift(groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data became 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:
closure - closure to execute when data becomes available. The closure should take at most one argument.


scheduleCallback

@SuppressWarnings({"TypeMayBeWeakened"})
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

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


separate

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


separate

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


separate

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


separate

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


separate

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


setMetaClass

@Override
public final void setMetaClass(groovy.lang.MetaClass metaClass)


setProperty

@Override
public final void setProperty(java.lang.String propertyName, java.lang.Object newValue)


split

@Override
public void split(DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@Override
public void split(java.util.List targets)


split

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


split

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


split

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


split

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


split

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


split

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


split

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


split

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


subscribe

protected final void subscribe()
A utility method to call at the very end of constructors of derived expressions. Creates and subscribes a listener to monitor the expression


subscribe

protected void subscribe(DataflowExpression.DataflowExpressionsCollector listener)


tap

@Override
public DataflowReadChannel tap(DataflowWriteChannel target)


tap

@Override
public DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)


tap

@SuppressWarnings({"ClassReferencesSubclass"})
@Override
public DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)


tap

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


tap

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


tap

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


then

@Override
public final Promise then(groovy.lang.Closure closure)
Schedule closure to be executed after data became 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:
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.


then

@Override
public final Promise then(Pool pool, groovy.lang.Closure closure)
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.


then

@Override
public final Promise then(PGroup group, groovy.lang.Closure closure)
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:
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.
Returns:
A promise for the results of the supplied closure. This allows for chaining of then() method calls.


toString

@SuppressWarnings({"ArithmeticOnVolatileField"})
@Override
public java.lang.String toString()


transform

public static DataflowExpression transform(java.lang.Object another, groovy.lang.Closure closure)
Transforms values bound eventually to dataflow variables using the supplied closure.
Parameters:
another - A list of DataflowVariables to transform
closure - The transformation function, which must take the same number of arguments as there are elements in the "another" list
- Type of the bound values
Returns:
The value returned from the transformation closure.


whenBound

@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:
closure - closure to execute when data becomes available. The closure should take at most one argument.


whenBound

@Override
public void whenBound(Pool pool, 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.


whenBound

@Override
public final void whenBound(PGroup group, 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

@Override
public final void whenBound(MessageStream stream)
Send the bound data to provided stream when it becomes available
Parameters:
stream - stream where to send result


wheneverBound

@Override
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:
closure - closure to execute when data becomes available. The closure should take at most one argument.


wheneverBound

@Override
public final void wheneverBound(MessageStream stream)
Send all pieces of data bound in the future to the provided stream when it becomes available.
Parameters:
stream - stream where to send result


 

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