groovyx.gpars.dataflow.expression
Class DataflowExpression.DataflowExpressionsCollector
java.lang.Object
groovyx.gpars.serial.WithSerialId
groovyx.gpars.actor.impl.MessageStream
groovyx.gpars.dataflow.expression.DataflowExpression.DataflowExpressionsCollector
- All Implemented Interfaces:
- java.io.Serializable
- Enclosing class:
- DataflowExpression<T>
final class DataflowExpression.DataflowExpressionsCollector
- extends MessageStream
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.
Field Summary |
private java.util.concurrent.atomic.AtomicInteger |
count
|
private static long |
serialVersionUID
|
Method Summary |
MessageStream |
send(java.lang.Object message)
Send message to stream and return immediately |
(package private) void |
start()
|
(package private) java.lang.Object |
subscribe(java.lang.Object element)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
count
private final java.util.concurrent.atomic.AtomicInteger count
DataflowExpression.DataflowExpressionsCollector
DataflowExpression.DataflowExpressionsCollector()
send
public MessageStream send(java.lang.Object message)
- Description copied from class:
MessageStream
- Send message to stream and return immediately
- Specified by:
send
in class MessageStream
- Parameters:
message
- message to send
- Returns:
- always return message stream itself
subscribe
java.lang.Object subscribe(java.lang.Object element)
start
void start()