|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.dataflow.stream.DataflowStreamReadAdapter
@SuppressWarnings({"unchecked"}) public class DataflowStreamReadAdapter
Adapts a DataflowStream to accommodate for the DataflowReadChannel interface. To minimize the overhead and stay in-line with the DataflowStream semantics, the DataflowStreamReadAdapter class is not thread-safe and should only be used from within a single thread. If multiple threads need to read from a DataflowStream, they should each create their own wrapping DataflowStreamReadAdapter.
- The type of messages to pass through the streamField Summary | |
---|---|
private StreamCore |
asyncHead
|
private DataflowChannelEventOrchestrator |
eventManager
|
private StreamCore |
head
|
Constructor Summary | |
DataflowStreamReadAdapter(StreamCore stream)
Creates a new adapter |
Method Summary | |
---|---|
protected java.util.List
|
allUnprocessedDFVs()
|
void
|
binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
void
|
binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
void
|
binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
void
|
binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
void
|
binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
void
|
binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
|
DataflowReadChannel
|
chainWith(groovy.lang.Closure closure)
|
DataflowReadChannel
|
chainWith(Pool pool, groovy.lang.Closure closure)
|
DataflowReadChannel
|
chainWith(PGroup group, groovy.lang.Closure closure)
|
DataflowReadChannel
|
chainWith(java.util.Map params, groovy.lang.Closure closure)
|
DataflowReadChannel
|
chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)
|
DataflowReadChannel
|
chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)
|
void
|
choice(java.util.List outputs, groovy.lang.Closure code)
|
void
|
choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)
|
void
|
choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)
|
void
|
choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
void
|
choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
void
|
choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
DataflowReadChannel
|
filter(groovy.lang.Closure closure)
|
DataflowReadChannel
|
filter(Pool pool, groovy.lang.Closure closure)
|
DataflowReadChannel
|
filter(PGroup group, groovy.lang.Closure closure)
|
DataflowReadChannel
|
filter(java.util.Map params, groovy.lang.Closure closure)
|
DataflowReadChannel
|
filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)
|
DataflowReadChannel
|
filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)
|
private void
|
fireOnMessage(java.lang.Object value)
|
DataflowChannelEventListenerManager
|
getEventManager()
|
java.lang.Object
|
getVal()
|
java.lang.Object
|
getVal(long timeout, java.util.concurrent.TimeUnit units)
|
void
|
getValAsync(MessageStream callback)
|
void
|
getValAsync(java.lang.Object attachment, MessageStream callback)
|
void
|
into(DataflowWriteChannel target)
|
void
|
into(Pool pool, DataflowWriteChannel target)
|
void
|
into(PGroup group, DataflowWriteChannel target)
|
void
|
into(java.util.Map params, DataflowWriteChannel target)
|
void
|
into(Pool pool, java.util.Map params, DataflowWriteChannel target)
|
void
|
into(PGroup group, java.util.Map params, DataflowWriteChannel target)
|
boolean
|
isBound()
|
java.util.Iterator
|
iterator()
|
int
|
length()
Returns the current size of the buffer |
DataflowReadChannel
|
merge(DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(java.util.List others, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(Pool pool, java.util.List others, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(PGroup group, java.util.List others, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)
|
DataflowReadChannel
|
merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)
|
private void
|
moveAsyncHead()
|
private void
|
moveHead()
|
DataflowReadChannel
|
or(groovy.lang.Closure closure)
|
void
|
or(DataflowWriteChannel target)
|
DataflowExpression
|
poll()
|
Promise
|
rightShift(groovy.lang.Closure closure)
|
void
|
separate(java.util.List outputs, groovy.lang.Closure code)
|
void
|
separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)
|
void
|
separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)
|
void
|
separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
void
|
separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
void
|
separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
|
private boolean
|
shouldReportTimeout()
|
void
|
split(DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(java.util.List targets)
|
void
|
split(Pool pool, java.util.List targets)
|
void
|
split(PGroup group, java.util.List targets)
|
void
|
split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
|
void
|
split(java.util.Map params, java.util.List targets)
|
void
|
split(Pool pool, java.util.Map params, java.util.List targets)
|
void
|
split(PGroup group, java.util.Map params, java.util.List targets)
|
DataflowReadChannel
|
tap(DataflowWriteChannel target)
|
DataflowReadChannel
|
tap(Pool pool, DataflowWriteChannel target)
|
DataflowReadChannel
|
tap(PGroup group, DataflowWriteChannel target)
|
DataflowReadChannel
|
tap(java.util.Map params, DataflowWriteChannel target)
|
DataflowReadChannel
|
tap(Pool pool, java.util.Map params, DataflowWriteChannel target)
|
DataflowReadChannel
|
tap(PGroup group, java.util.Map params, DataflowWriteChannel target)
|
Promise
|
then(groovy.lang.Closure closure)
Schedule closure to be executed after data became available. |
Promise
|
then(Pool pool, groovy.lang.Closure closure)
Schedule closure to be executed after data becomes available. |
Promise
|
then(PGroup group, groovy.lang.Closure closure)
Schedule closure to be executed after data becomes available. |
java.lang.String
|
toString()
|
void
|
whenBound(groovy.lang.Closure closure)
|
void
|
whenBound(Pool pool, groovy.lang.Closure closure)
Schedule closure to be executed by pooled actor after data becomes available. |
void
|
whenBound(PGroup group, groovy.lang.Closure closure)
|
void
|
whenBound(MessageStream stream)
|
void
|
wheneverBound(groovy.lang.Closure closure)
|
void
|
wheneverBound(MessageStream stream)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), 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() |
Field Detail |
---|
private StreamCore asyncHead
private DataflowChannelEventOrchestrator eventManager
private StreamCore head
Constructor Detail |
---|
public DataflowStreamReadAdapter(StreamCore stream)
stream
- The stream to wrap
Method Detail |
---|
protected final java.util.List allUnprocessedDFVs()
@Override public void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)
@Override public final DataflowReadChannel chainWith(groovy.lang.Closure closure)
@Override public final DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)
@Override public DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)
@Override public final DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)
@Override public final DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)
@Override public DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)
@Override public void choice(java.util.List outputs, groovy.lang.Closure code)
@Override public void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)
@Override public void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)
@Override public void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
@Override public void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
@Override public void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
@Override public DataflowReadChannel filter(groovy.lang.Closure closure)
@Override public DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)
@Override public DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)
@Override public DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)
@Override public DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)
@Override public DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)
private void fireOnMessage(java.lang.Object value)
@Override public DataflowChannelEventListenerManager getEventManager()
@Override public java.lang.Object getVal()
@Override public java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)
@Override public void getValAsync(MessageStream callback)
@Override public void getValAsync(java.lang.Object attachment, MessageStream callback)
@Override public void into(DataflowWriteChannel target)
@Override public void into(Pool pool, DataflowWriteChannel target)
@Override public void into(PGroup group, DataflowWriteChannel target)
@Override public void into(java.util.Map params, DataflowWriteChannel target)
@Override public void into(Pool pool, java.util.Map params, DataflowWriteChannel target)
@Override public void into(PGroup group, java.util.Map params, DataflowWriteChannel target)
@Override public boolean isBound()
public java.util.Iterator iterator()
@Override public int length()
@Override public DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)
@Override public DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)
private void moveAsyncHead()
private void moveHead()
@Override public DataflowReadChannel or(groovy.lang.Closure closure)
@Override public void or(DataflowWriteChannel target)
@Override public DataflowExpression poll()
@Override public Promise rightShift(groovy.lang.Closure closure)
@Override public void separate(java.util.List outputs, groovy.lang.Closure code)
@Override public void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)
@Override public void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)
@Override public void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
@Override public void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
@Override public void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)
private boolean shouldReportTimeout()
@Override public void split(DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(java.util.List targets)
@Override public void split(Pool pool, java.util.List targets)
@Override public void split(PGroup group, java.util.List targets)
@Override public void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)
@Override public void split(java.util.Map params, java.util.List targets)
@Override public void split(Pool pool, java.util.Map params, java.util.List targets)
@Override public void split(PGroup group, java.util.Map params, java.util.List targets)
@Override public DataflowReadChannel tap(DataflowWriteChannel target)
@Override public DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)
@Override public DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)
@Override public DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)
@Override public DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)
@Override public DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)
@Override public final Promise then(groovy.lang.Closure closure)
closure
- closure to execute when data becomes available. The closure should take at most one argument.
@Override public Promise then(Pool pool, groovy.lang.Closure closure)
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.
@Override public Promise then(PGroup group, groovy.lang.Closure closure)
group
- The PGroup to use for task scheduling for asynchronous message deliveryclosure
- closure to execute when data becomes available. The closure should take at most one argument.
@SuppressWarnings("ObjectToString") @Override public final java.lang.String toString()
@Override public void whenBound(groovy.lang.Closure closure)
@Override 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 becomes available. The closure should take at most one argument.
@Override public void whenBound(PGroup group, groovy.lang.Closure closure)
@Override public void whenBound(MessageStream stream)
@Override public void wheneverBound(groovy.lang.Closure closure)
@Override public void wheneverBound(MessageStream stream)
Copyright © 2008–2012 Václav Pech. All Rights Reserved.