org.codehaus.gpars

groovyx.gpars.dataflow.stream
[Java] Class DataflowStreamReadAdapter

java.lang.Object
  groovyx.gpars.dataflow.stream.DataflowStreamReadAdapter
All Implemented Interfaces:
DataflowReadChannel

@java.lang.SuppressWarningsthis.head.addUpdateListener(new DataflowChannelListener() {
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.

Parameters:
- The type of messages to pass through the stream
Authors:
Vaclav Pech


Field Summary
private StreamCore asyncHead

private DataflowChannelEventOrchestrator eventManager

private StreamCore head

 
Constructor Summary
DataflowStreamReadAdapter(StreamCore stream)

 
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()

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)

Promise then(Pool pool, groovy.lang.Closure closure)

Promise then(PGroup group, groovy.lang.Closure closure)

java.lang.String toString()

void whenBound(groovy.lang.Closure closure)

void whenBound(Pool pool, groovy.lang.Closure closure)

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, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

asyncHead

private StreamCore asyncHead


eventManager

private DataflowChannelEventOrchestrator eventManager


head

private StreamCore head


 
Constructor Detail

DataflowStreamReadAdapter

public DataflowStreamReadAdapter(StreamCore stream)


 
Method Detail

allUnprocessedDFVs

protected final java.util.List allUnprocessedDFVs()


binaryChoice

@java.lang.Override
public void binaryChoice(DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(Pool pool, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(PGroup group, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Override
public void binaryChoice(java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Overridepublic void choice(final List> outputs, final Closure code) {
public void binaryChoice(Pool pool, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


binaryChoice

@java.lang.Overridepublic void choice(final Pool pool, final List> outputs, final Closure code) {
public void binaryChoice(PGroup group, java.util.Map params, DataflowWriteChannel trueBranch, DataflowWriteChannel falseBranch, groovy.lang.Closure code)


chainWith

@java.lang.Override}
public final DataflowReadChannel chainWith(groovy.lang.Closure closure)


chainWith

@java.lang.Override}
public final DataflowReadChannel chainWith(Pool pool, groovy.lang.Closure closure)


chainWith

@java.lang.Override}
public DataflowReadChannel chainWith(PGroup group, groovy.lang.Closure closure)


chainWith

@java.lang.Overrideparameters.put("outputs", asList(result));
public final DataflowReadChannel chainWith(java.util.Map params, groovy.lang.Closure closure)


chainWith

@java.lang.Override
public final DataflowReadChannel chainWith(Pool pool, java.util.Map params, groovy.lang.Closure closure)


chainWith

@java.lang.Override
public DataflowReadChannel chainWith(PGroup group, java.util.Map params, groovy.lang.Closure closure)


choice

@java.lang.Override
public void choice(java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(Pool pool, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(PGroup group, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Override
public void choice(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Overridepublic void separate(final List> outputs, final Closure> code) {
public void choice(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


choice

@java.lang.Overridepublic void separate(final Pool pool, final List> outputs, final Closure> code) {
public void choice(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


filter

@java.lang.Override
public DataflowReadChannel filter(groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(Pool pool, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(PGroup group, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(java.util.Map params, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(Pool pool, java.util.Map params, groovy.lang.Closure closure)


filter

@java.lang.Override
public DataflowReadChannel filter(PGroup group, java.util.Map params, groovy.lang.Closure closure)


fireOnMessage

private void fireOnMessage(java.lang.Object value)


getEventManager

@java.lang.Overridereturn head.getFirstDFV().isBound();
public DataflowChannelEventListenerManager getEventManager()


getVal

@java.lang.OverridemoveHead();
public java.lang.Object getVal()


getVal

@java.lang.Override}
public java.lang.Object getVal(long timeout, java.util.concurrent.TimeUnit units)


getValAsync

@java.lang.Override}
public void getValAsync(MessageStream callback)


getValAsync

@java.lang.Override}
public void getValAsync(java.lang.Object attachment, MessageStream callback)


into

@java.lang.Override
public void into(DataflowWriteChannel target)


into

@java.lang.Override
public void into(Pool pool, DataflowWriteChannel target)


into

@java.lang.Override
public void into(PGroup group, DataflowWriteChannel target)


into

@java.lang.Overridegroup.operator(parameters, new ChainWithClosure(new CopyChannelsClosure()));
public void into(java.util.Map params, DataflowWriteChannel target)


into

@java.lang.Overrideinto(target);
public void into(Pool pool, java.util.Map params, DataflowWriteChannel target)


into

@java.lang.Overridesplit(Dataflow.retrieveCurrentDFPGroup(), target1, target2);
public void into(PGroup group, java.util.Map params, DataflowWriteChannel target)


isBound

@java.lang.Overridelength += 1;
public boolean isBound()


iterator

public java.util.Iterator iterator()


length

@java.lang.OverridemoveHead();
public int length()


merge

@java.lang.Override
public DataflowReadChannel merge(DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(Pool pool, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(PGroup group, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Overrideinputs.addAll(others);
public DataflowReadChannel merge(java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(Pool pool, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(PGroup group, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(Pool pool, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Override
public DataflowReadChannel merge(PGroup group, java.util.Map params, DataflowReadChannel other, groovy.lang.Closure closure)


merge

@java.lang.Overrideinputs.addAll(others);
public DataflowReadChannel merge(java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.Overridereturn result;
public DataflowReadChannel merge(Pool pool, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


merge

@java.lang.OverridebinaryChoice(Dataflow.retrieveCurrentDFPGroup(), trueBranch, falseBranch, code);
public DataflowReadChannel merge(PGroup group, java.util.Map params, java.util.List others, groovy.lang.Closure closure)


moveAsyncHead

private void moveAsyncHead()


moveHead

private void moveHead()


or

@java.lang.Override
public DataflowReadChannel or(groovy.lang.Closure closure)


or

@java.lang.Override
public void or(DataflowWriteChannel target)


poll

@java.lang.Override}
public DataflowExpression poll()


rightShift

@java.lang.Override*
public Promise rightShift(groovy.lang.Closure closure)


separate

@java.lang.Override
public void separate(java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override
public void separate(Pool pool, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override
public void separate(PGroup group, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override
public void separate(java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Override
public void separate(Pool pool, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


separate

@java.lang.Overridereturn eventManager;
public void separate(PGroup group, java.util.Map params, java.util.List outputs, groovy.lang.Closure code)


shouldReportTimeout

private boolean shouldReportTimeout()


split

@java.lang.Override
public void split(DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(Pool pool, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(PGroup group, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(java.util.List targets)


split

@java.lang.Override
public void split(Pool pool, java.util.List targets)


split

@java.lang.Override
public void split(PGroup group, java.util.List targets)


split

@java.lang.Override
public void split(java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(Pool pool, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(PGroup group, java.util.Map params, DataflowWriteChannel target1, DataflowWriteChannel target2)


split

@java.lang.Override
public void split(java.util.Map params, java.util.List targets)


split

@java.lang.Overridepublic DataflowReadChannel tap(final DataflowWriteChannel target) {
public void split(Pool pool, java.util.Map params, java.util.List targets)


split

@java.lang.Overridepublic DataflowReadChannel tap(final Pool pool, final DataflowWriteChannel target) {
public void split(PGroup group, java.util.Map params, java.util.List targets)


tap

@java.lang.Override}
public DataflowReadChannel tap(DataflowWriteChannel target)


tap

@java.lang.Override}
public DataflowReadChannel tap(Pool pool, DataflowWriteChannel target)


tap

@java.lang.Override}
public DataflowReadChannel tap(PGroup group, DataflowWriteChannel target)


tap

@java.lang.Overrideparameters.put("outputs", asList(result, target));
public DataflowReadChannel tap(java.util.Map params, DataflowWriteChannel target)


tap

@java.lang.Override
public DataflowReadChannel tap(Pool pool, java.util.Map params, DataflowWriteChannel target)


tap

@java.lang.Override
public DataflowReadChannel tap(PGroup group, java.util.Map params, DataflowWriteChannel target)


then

@java.lang.Override*/
public final Promise then(groovy.lang.Closure closure)


then

@java.lang.Override*/
public Promise then(Pool pool, groovy.lang.Closure closure)


then

@java.lang.Override}
public Promise then(PGroup group, groovy.lang.Closure closure)


toString

@java.lang.SuppressWarningsfinal T value = head.getFirstDFV().getVal(timeout, units);
@java.lang.Overrideif (value == null) {
public final java.lang.String toString()


whenBound

@java.lang.Overridepublic  void whenBound(final Pool pool, final Closure closure) {
public void whenBound(groovy.lang.Closure closure)


whenBound

@java.lang.OverridemoveAsyncHead();
public void whenBound(Pool pool, groovy.lang.Closure closure)


whenBound

@java.lang.Override* will not happen immediately but will be scheduled
public void whenBound(PGroup group, groovy.lang.Closure closure)


whenBound

@java.lang.Overridepublic final  Promise then(final Closure closure) {
public void whenBound(MessageStream stream)


wheneverBound

@java.lang.Override
public void wheneverBound(groovy.lang.Closure closure)


wheneverBound

@java.lang.Override
public void wheneverBound(MessageStream stream)


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.