T
- Type for values to pass through the streampublic final class DataflowStream<T> extends StreamCore<T>
The DataflowStream class is designed for single-threaded producers and consumers. If multiple threads are supposed to read or write values to the stream, their access to the stream must be serialized externally or the adapters should be used.
first, rest, wheneverBoundListeners
Modifier | Constructor and Description |
---|---|
|
DataflowStream()
Creates an empty stream
|
|
DataflowStream(groovy.lang.Closure toBeApplied)
Creates a stream while applying the supplied initialization closure to it
|
private |
DataflowStream(java.util.Collection<MessageStream> wheneverBoundListeners,
java.util.Collection<DataflowChannelListener<T>> updateListeners) |
Modifier and Type | Method and Description |
---|---|
protected StreamCore<T> |
createNewStream()
A factory method to create new instances of the correct class when needed
|
FList<T> |
getRest()
Retrieves a DataflowStream representing the rest of this Stream after removing the first element
|
java.lang.String |
toString() |
addUpdateListener, appendingString, apply, decrementParties, eos, equals, filter, generate, getFirst, getFirstDFV, hashCode, incrementParties, isEmpty, iterator, leftShift, leftShift, map, reduce, reduce, wheneverBound, wheneverBound
public DataflowStream()
public DataflowStream(groovy.lang.Closure toBeApplied)
toBeApplied
- The closure to use for initializationprivate DataflowStream(java.util.Collection<MessageStream> wheneverBoundListeners, java.util.Collection<DataflowChannelListener<T>> updateListeners)
public FList<T> getRest()
protected StreamCore<T> createNewStream()
createNewStream
in class StreamCore<T>
public java.lang.String toString()
toString
in class java.lang.Object