Provides a special implementation of DataflowStreamReadAdapter, which cooperates with SyncDataflowBroadcast subscription and un-subscription mechanism.
- The type of messages to pass through the streamModifiers | Name | Description |
---|---|---|
private boolean |
closed |
|
private boolean |
wheneverBoundSet |
Fields inherited from class | Fields |
---|---|
class DataflowStreamReadAdapter |
asyncHead, eventManager, head |
Constructor and description |
---|
SyncDataflowStreamReadAdapter
(StreamCore<T> stream) Creates a new adapter |
Type | Name and description |
---|---|
DataflowReadChannel<V> |
chainWith(PGroup group, groovy.lang.Closure<V> closure) |
private void |
checkClosed() |
void |
close() Closes the channel so that it cannot be used any longer |
T |
getVal() |
T |
getVal(long timeout, java.util.concurrent.TimeUnit units) |
void |
getValAsync(MessageStream callback) |
void |
getValAsync(java.lang.Object attachment, MessageStream callback) |
boolean |
isBound() |
java.util.Iterator<T> |
iterator() |
DataflowReadChannel<V> |
merge(PGroup group, java.util.List<DataflowReadChannel<java.lang.Object>> others, groovy.lang.Closure<V> closure) |
DataflowExpression<T> |
poll() |
Promise<V> |
rightShift(groovy.lang.Closure<V> closure) |
DataflowReadChannel<T> |
tap(PGroup group, DataflowWriteChannel<T> target) |
void |
whenBound(groovy.lang.Closure<V> closure) |
void |
whenBound(Pool pool, groovy.lang.Closure<V> closure) Schedule closure to be executed by pooled actor after data becomes available. |
void |
whenBound(PGroup group, groovy.lang.Closure<V> closure) |
void |
whenBound(MessageStream stream) |
void |
wheneverBound(groovy.lang.Closure<V> closure) |
void |
wheneverBound(MessageStream stream) |
Creates a new adapter
stream
- The stream to wrapCloses the channel so that it cannot be used any longer
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.
pool
- The thread pool to use for task scheduling for asynchronous message deliveryclosure
- closure to execute when data becomes available. The closure should take at most one argument.Copyright © 2008–2014 Václav Pech. All Rights Reserved.