A helper class enabling the 'whenBound()' or 'getValAsync' functionality of a DataflowVariable and DataflowQueue, whenever a thread pool instead of a PGroup is specified.. 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 Pool |
pool |
|
private static long |
serialVersionUID |
Fields inherited from class | Fields |
---|---|
class MessageStream |
serialVersionUID |
class WithSerialId |
serialHandle, serialVersionUID |
Constructor and description |
---|
DataCallbackWithPool
(Pool pool, groovy.lang.Closure code) @param pool The thread pool to schedule on |
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() |
pool
- The thread pool to schedule oncode
- The closure to runSends 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.