A helper class enabling the 'whenBound()' or 'getValAsync' functionality of a DataflowVariable and DataflowQueue, as well as 'sendAndContinue()' on actors. A task that waits asynchronously on the DFV to be bound. Once the DFV is bound, upon receiving the message the actor runs the supplied closure / code with the DFV value as a parameter.
Modifiers | Name | Description |
---|---|---|
private groovy.lang.Closure |
code |
|
private PGroup |
parallelGroup |
|
private static long |
serialVersionUID |
Fields inherited from class | Fields |
---|---|
class MessageStream |
serialVersionUID |
class WithSerialId |
serialHandle, serialVersionUID |
Constructor and description |
---|
DataCallback
(groovy.lang.Closure code, PGroup pGroup) @param code The closure to run |
Type | Name and description |
---|---|
MessageStream |
send(java.lang.Object message) Sends a message back to the DataCallback. |
Methods inherited from class | Name |
---|---|
class MessageStream |
call, getRemoteClass, leftShift, reInterrupt, send, send, send, sendAndWait, sendAndWait, sendAndWait |
class WithSerialId |
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace |
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
code
- The closure to runpGroup
- pGroup The parallel group to joinSends a message back to the DataCallback. Will schedule processing the internal closure with the thread pool Registers its parallel group with DataflowExpressions for nested 'whenBound' handlers to use the same group.
Copyright © 2008–2014 Václav Pech. All Rights Reserved.