Implement this trait (at least the onNext method) to create a new synchronous one-to-many Transform.
Implement this trait (at least the onNext method) to create a new asynchronous one-to-one Transform.
A trait that allows implementing a custom StreamOutput that processes items asynchronously.
A trait that allows implementing a custom StreamOutput that processes items asynchronously.
This often allows writing more elegant code for complex stateful consumers.
A trait that allows implementing a custom StreamInput that produces items asynchronously.
A trait that allows implementing a custom StreamInput that produces items asynchronously.
This often allows writing more elegant code for complex stateful producers.
Concatenates several inputs to a single output.
Connectors represent the only ways to connect multiple inputs to one output, or multiple outputs to one input.
Connectors represent the only ways to connect multiple inputs to one output, or multiple outputs to one input.
They never change the elements going through them, which is also why there is only one type parameter T
for both
input and output.
Common trait for the inputs and outputs of a Connector.
A Sink which inputs data into a connector.
A Sink which inputs data into a connector.
This type allows connecting Sources to a Connector, which is not itself a StreamComponent of any kind.
A Source which outputs data from a connector.
A Source which outputs data from a connector.
This type allows connecting Sinks to a Connector, which is not itself a StreamComponent of any kind.
A Transform or more complex Pipe which will become available, and start operating, once future
is fulfilled.
A Transform or more complex Pipe which will become available, and start operating, once future
is fulfilled.
If the future is fulfilled when the stream is built, it acts as an ordinary pipe. Otherwise, components upstream of this transform will pause when they try to push data into it, until the future is completed.
A StreamOutput or more complex Sink which will become available, and start operating, once future
is fulfilled.
A StreamInput or more complex Source which will become available, and start operating, once future
is fulfilled.
A StreamInput that can be driven directly once the stream is running, providing the most efficient option for sending input into a running stream.
A StreamInput that can be driven directly once the stream is running, providing the most efficient option for
sending input into a running stream. Use with Source.drive
.
The interface used to drive the stream is available via aside
once the containing stream starts running.
NOTE that you MUST call the onNext and onComplete functions on the StreamConsumer non-concurrently,
or the stream implementation will break.
Thrown by StreamInput.producer to indicate the stream has completed.
A Source that generates elements by calling a user-supplied producer
function.
A Source producing elements from an Iterator.
Merges data from several inputs to one output.
Merges data from several inputs to one output. Ordering is not strictly guaranteed, but the connector will not wait for an input if another input has data available.
A 1-to-many transformation of stream elements, equivalent to a flatMap
.
A mixin for trait-based stream component implementations that provides a new builder in a succint way.
A mixin for trait-based stream component implementations that provides a new builder in a succint way. You can still override it to plug in your own builder.
A transformation that does nothing.
A transformation that does nothing. When this is present in a stream, the materialization phase eliminates it.
A part of a stream with a single unconnected input SinkComponent and a single unconnected output SourceComponent.
A part of a stream with a single unconnected input SinkComponent and a single unconnected output SourceComponent.
It can represent a single component (a Transform), or a series of components which are already fully connected to one another.
Distributes data from one input to several outputs in parallel.
Distributes data from one input to several outputs in parallel.
Each output is driven asynchronously. For each input element, the first available output is picked. If all outputs are busy when an input element arrives, we wait for any output to become available.
A StreamOutput represented as a triplet of onXxx functions.
A StreamOutput represented as a triplet of onXxx functions.
A 1-to-1 transformation of stream elements, equivalent to a map
.
A part of a stream with a single unconnected SinkComponent.
A part of a stream with a single unconnected SinkComponent.
It can represent a single component (a StreamOutput), or multiple components (an output, transformers and connectors) which are already fully connected to one another. Its result is that of the original StreamOutput.
Any stream component that receives input elements from a Source.
A part of a stream with a single unconnected SourceComponent.
A part of a stream with a single unconnected SourceComponent.
It can represent a single component (a StreamInput), or multiple components (inputs, transformers and connectors) which are already fully connected to one another.
Any stream component that produces elements to a downstream Sink.
Mixed into Source
implementations to add shortcut methods to constructors of Source, Transform, Sink and Connect.
Mixed into Source
implementations to add shortcut methods to constructors of Source, Transform, Sink and Connect.
All methods here have three variants: - One taking function literals A => B - Another called xxxAsync taking function literals A => Future[B] - And a third called xxxFunc taking Func objects.
Although they have different signatures, making them into overloads would remove the ability to call the synchronous
variant (the most common case) with function literals like source.map(_ + 1)
.
Distributes data from one input to several outputs.
Distributes data from one input to several outputs. Each chosen output is called sequentially and must complete handling the element before the next output is called.
called for each input element. Should return the outputs to which this element is copied. If an empty BitSet is returned, the element is dropped.
Common marker trait of stream components: Source, Sink, Transform, etc.
Common marker trait of stream components: Source, Sink, Transform, etc.
NOTE: the trait constructor registers this instance with the StreamBuilder returned by builder
!
See the README for the semantics of the three onXxx functions.
Marker trait of all exceptions used by the streams library for flow control.
Marker trait of all exceptions used by the streams library for flow control.
NOTE that extending ControlThrowable means scala.util.control.NonFatal does NOT catch exceptions of this type.
A Source that introduces data into the stream from elsewhere, rather than from an upstream component.
A Sink that sends data outside the stream, calculates a result, and/or has some other useful side effects.
A Source that produces data by repeatedly calling the user-provided function producer
.
Implement this trait (at least the onNext method) to create a new synchronous one-to-one Transform.
Implement this trait (at least the onNext method) to create a new synchronous one-to-one Transform.
A trait that allows implementing a custom StreamOutput that processes items synchronously.
A trait that allows implementing a custom StreamOutput that processes items synchronously.
This often allows writing more elegant code for complex stateful consumers.
A trait that allows implementing a custom StreamInput that produces items synchronously.
A trait that allows implementing a custom StreamInput that produces items synchronously.
This often allows writing more elegant code for complex stateful producers.
A transformation of an element stream.
A transformation of an element stream. The input and output elements don't always have a 1-to-1 correspondence.
Common supertrait of the non-sealed traits the user can extend to implement a Transform.