T
- Type for values to pass through the streampublic final class SyncDataflowStream<T> extends StreamCore<T>
Modifier and Type | Field and Description |
---|---|
private int |
parties |
first, rest, wheneverBoundListeners
Modifier | Constructor and Description |
---|---|
|
SyncDataflowStream(int parties)
Creates an empty stream
|
|
SyncDataflowStream(int parties,
groovy.lang.Closure toBeApplied)
Creates an empty stream while applying the supplied initialization closure to it
|
private |
SyncDataflowStream(int parties,
java.util.Collection<MessageStream> wheneverBoundListeners)
Creates an empty stream with the specified listeners set
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
appendingString() |
protected StreamCore<T> |
createNewStream()
A factory method to create new instances of the correct class when needed
|
void |
decrementParties()
Decreases the number of parties required to perform the data exchange
|
FList<T> |
getRest()
Retrieves a DataflowStream representing the rest of this Stream after removing the first element
|
void |
incrementParties()
Increases the number of parties required to perform the data exchange
|
private boolean |
isEmptyWithRespectToSync() |
java.lang.String |
toString() |
apply, eos, equals, filter, generate, getFirst, getFirstDFV, hashCode, isEmpty, iterator, leftShift, leftShift, map, reduce, reduce, wheneverBound, wheneverBound
public SyncDataflowStream(int parties)
parties
- The number of readers to ask for a value before the message gets exchanged.public SyncDataflowStream(int parties, groovy.lang.Closure toBeApplied)
parties
- The number of readers to ask for a value before the message gets exchanged.toBeApplied
- The closure to use for initializationprivate SyncDataflowStream(int parties, java.util.Collection<MessageStream> wheneverBoundListeners)
parties
- The number of readers to ask for a value before the message gets exchanged.wheneverBoundListeners
- The collection of listeners to bind to the streampublic FList<T> getRest()
protected StreamCore<T> createNewStream()
createNewStream
in class StreamCore<T>
public java.lang.String appendingString()
appendingString
in interface FList<T>
appendingString
in class StreamCore<T>
public java.lang.String toString()
toString
in class java.lang.Object
private boolean isEmptyWithRespectToSync()
public void incrementParties()
incrementParties
in class StreamCore<T>
public void decrementParties()
decrementParties
in class StreamCore<T>