|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.dataflow.stream.DataflowStreamWriteAdapter<T>
T
- The type of messages to pass through the streampublic class DataflowStreamWriteAdapter<T>
Adapts a DataflowStream to accommodate for the DataflowWriteChannel interface. It also synchronizes all changes to the underlying stream allowing multiple threads accessing the stream concurrently.
Field Summary | |
---|---|
private StreamCore<T> |
head
|
Constructor Summary | |
---|---|
DataflowStreamWriteAdapter(StreamCore<T> stream)
Creates a new adapter |
Method Summary | |
---|---|
void |
bind(T value)
Assigns a value to the variable. |
protected StreamCore<T> |
getHead()
|
DataflowWriteChannel<T> |
leftShift(DataflowReadChannel<T> ref)
Assigns a value from one DataflowVariable instance to this variable. |
DataflowWriteChannel<T> |
leftShift(T value)
Assigns a value to the variable. |
java.lang.String |
toString()
|
private StreamCore<T> |
updateHead()
Moves head |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private StreamCore<T> head
Constructor Detail |
---|
public DataflowStreamWriteAdapter(StreamCore<T> stream)
stream
- The stream to wrapMethod Detail |
---|
public final DataflowWriteChannel<T> leftShift(T value)
DataflowWriteChannel
leftShift
in interface DataflowWriteChannel<T>
value
- The value to assign
public final DataflowWriteChannel<T> leftShift(DataflowReadChannel<T> ref)
DataflowWriteChannel
leftShift
in interface DataflowWriteChannel<T>
ref
- The DataflowVariable instance the value of which to bind
public final void bind(T value)
DataflowWriteChannel
bind
in interface DataflowWriteChannel<T>
value
- The value to assignprivate StreamCore<T> updateHead()
public java.lang.String toString()
toString
in class java.lang.Object
protected final StreamCore<T> getHead()
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |