|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface DataflowReadChannel
A common interface for all dataflow variables, streams or queues
Method Summary | |
---|---|
T
|
getVal()
Reads the current value of the channel. |
T
|
getVal(long timeout, java.util.concurrent.TimeUnit units)
Reads the current value of the channel. |
void
|
getValAsync(MessageStream callback)
Asynchronously retrieves the value from the channel. |
void
|
getValAsync(java.lang.Object attachment, MessageStream callback)
Asynchronously retrieves the value from the channel. |
boolean
|
isBound()
Check if value has been set already for this expression |
DataflowExpression
|
poll()
Retrieves the value at the head of the buffer. |
void
|
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 data already available the execution of closure will not happen immediately but will be scheduled |
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 data already available the execution of closure will not happen immediately but will be scheduled. |
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 data already available the execution of closure will not happen immediately but will be scheduled. |
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 data already available the execution of closure will not happen immediately but will be scheduled. |
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 |
Method Detail |
---|
public T getVal()
public T getVal(long timeout, java.util.concurrent.TimeUnit units)
timeout
- The timeout valueunits
- Units for the timeout
public void getValAsync(MessageStream callback)
callback
- An actor to send the bound value to.
public void getValAsync(java.lang.Object attachment, MessageStream callback)
attachment
- arbitrary non-null attachment if reader needs better identification of resultcallback
- An actor to send the bound value plus the supplied index to.
public boolean isBound()
@SuppressWarnings({"ClassReferencesSubclass"}) public DataflowExpression poll()
public void rightShift(groovy.lang.Closure closure)
closure
- closure to execute when data available
public void whenBound(groovy.lang.Closure closure)
closure
- closure to execute when data available
public void whenBound(Pool pool, groovy.lang.Closure closure)
pool
- The thread pool to use for task scheduling for asynchronous message deliveryclosure
- closure to execute when data available
public void whenBound(PGroup group, groovy.lang.Closure closure)
group
- The PGroup to use for task scheduling for asynchronous message deliveryclosure
- closure to execute when data available
public void whenBound(MessageStream stream)
stream
- stream where to send result
public void wheneverBound(groovy.lang.Closure closure)
closure
- closure to execute when data available
public void wheneverBound(MessageStream stream)
stream
- stream where to send result
Copyright © 2008–2010 Václav Pech. All Rights Reserved.