com.fsist

stream

package stream

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. stream
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AsyncMultiTransform[-In, +Out] extends UserTransform[In, Out] with AsyncFunc[In, Iterable[Out]]

    Implement this trait (at least the onNext method) to create a new synchronous one-to-many Transform.

  2. trait AsyncSingleTransform[-In, +Out] extends UserTransform[In, Out] with AsyncFunc[In, Out]

    Implement this trait (at least the onNext method) to create a new asynchronous one-to-one Transform.

  3. trait AsyncStreamConsumer[-In, +Res] extends StreamConsumer[In, Res] with AsyncFunc[In, Unit] with NewBuilder

    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.

  4. trait AsyncStreamProducer[+Out] extends StreamProducer[Out] with AsyncFunc[Unit, Out] with NewBuilder

    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.

  5. final case class Concatenator[T](inputCount: Int)(implicit builder: FutureStreamBuilder) extends Connector[T] with Product with Serializable

    Concatenates several inputs to a single output.

  6. sealed trait Connector[T] extends AnyRef

    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.

  7. sealed trait ConnectorEdge[T] extends StreamComponentBase

    Common trait for the inputs and outputs of a Connector.

  8. final case class ConnectorInput[T](connector: Connector[T], index: Int)(implicit builder: FutureStreamBuilder) extends SinkComponentBase[T] with ConnectorEdge[T] with Product with Serializable

    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.

  9. final case class ConnectorOutput[T](connector: Connector[T], index: Int)(implicit builder: FutureStreamBuilder) extends SourceComponentBase[T] with ConnectorEdge[T] with Product with Serializable

    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.

  10. final case class DelayedPipe[-In, +Out](builder: FutureStreamBuilder, future: Future[Pipe[In, Out]]) extends Transform[In, Out] with Product with Serializable

    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.

  11. final case class DelayedSink[-In, +Res](builder: FutureStreamBuilder, future: Future[Sink[In, Res]]) extends StreamOutput[In, Res] with Product with Serializable

    A StreamOutput or more complex Sink which will become available, and start operating, once future is fulfilled.

  12. final case class DelayedSource[+Out](builder: FutureStreamBuilder, future: Future[Source[Out]]) extends StreamInput[Out] with Product with Serializable

    A StreamInput or more complex Source which will become available, and start operating, once future is fulfilled.

  13. final case class DrivenSource[Out](builder: FutureStreamBuilder) extends StreamInput[Out] with Aside[StreamConsumer[Out, Unit]] with Product with Serializable

    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.

  14. case class EndOfStreamException() extends Exception with Product with Serializable

    Thrown by StreamInput.producer to indicate the stream has completed.

  15. final case class GeneratorSource[+Out](builder: FutureStreamBuilder, producer: Func[Unit, Out], onError: Func[Throwable, Unit]) extends StreamProducer[Out] with Product with Serializable

    A Source that generates elements by calling a user-supplied producer function.

  16. final case class IteratorSource[+Out](builder: FutureStreamBuilder, iter: Iterator[Out]) extends StreamProducer[Out] with SyncFunc[Unit, Out] with Product with Serializable

    A Source producing elements from an Iterator.

  17. final case class Merger[T](inputCount: Int)(implicit builder: FutureStreamBuilder) extends Connector[T] with Product with Serializable

    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.

  18. final case class MultiTransform[-In, +Out](builder: FutureStreamBuilder, onNext: Func[In, Iterable[Out]], onComplete: Func[Unit, Iterable[Out]], onError: Func[Throwable, Unit]) extends Transform[In, Out] with Product with Serializable

    A 1-to-many transformation of stream elements, equivalent to a flatMap.

  19. trait NewBuilder extends AnyRef

    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.

  20. final case class NopTransform[T](builder: FutureStreamBuilder) extends Transform[T, T] with Product with Serializable

    A transformation that does nothing.

    A transformation that does nothing. When this is present in a stream, the materialization phase eliminates it.

  21. final case class Pipe[-In, +Out](sink: SinkComponent[In], source: SourceComponent[Out]) extends SinkComponentBase[In] with SourceComponentBase[Out] with Product with Serializable

    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.

  22. final case class Scatterer[T](outputCount: Int)(implicit builder: FutureStreamBuilder) extends Connector[T] with Product with Serializable

    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.

  23. final case class SimpleOutput[-In, +Res](builder: FutureStreamBuilder, onNext: Func[In, Unit], onComplete: Func[Unit, Res], onError: Func[Throwable, Unit]) extends StreamConsumer[In, Res] with Product with Serializable

    A StreamOutput represented as a triplet of onXxx functions.

    A StreamOutput represented as a triplet of onXxx functions.

    See also

    com.fsist.stream.StreamOutput

  24. final case class SingleTransform[-In, +Out](builder: FutureStreamBuilder, onNext: Func[In, Out], onComplete: Func[Unit, Unit], onError: Func[Throwable, Unit]) extends Transform[In, Out] with Product with Serializable

    A 1-to-1 transformation of stream elements, equivalent to a map.

  25. final case class Sink[-In, +Res](sinkComponent: SinkComponent[In], output: StreamOutput[Nothing, Res]) extends Product with Serializable

    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.

  26. sealed trait SinkComponent[-In] extends StreamComponentBase

    Any stream component that receives input elements from a Source.

  27. final case class Source[+Out](sourceComponent: SourceComponent[Out]) extends SourceOps[Out] with Product with Serializable

    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.

  28. sealed trait SourceComponent[+Out] extends StreamComponentBase with SourceOps[Out]

    Any stream component that produces elements to a downstream Sink.

  29. trait SourceOps[+Out] extends AnyRef

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

  30. final case class Splitter[T](outputCount: Int, outputChooser: Func[T, BitSet])(implicit builder: FutureStreamBuilder) extends Connector[T] with Product with Serializable

    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.

    outputChooser

    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.

  31. sealed trait StreamComponent extends AnyRef

    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!

  32. sealed trait StreamConsumer[-In, +Res] extends StreamOutput[In, Res]

    See the README for the semantics of the three onXxx functions.

  33. sealed trait StreamControlThrowable extends Throwable with ControlThrowable

    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.

  34. sealed trait StreamInput[+Out] extends SourceComponentBase[Out]

    A Source that introduces data into the stream from elsewhere, rather than from an upstream component.

  35. sealed trait StreamOutput[-In, +Res] extends SinkComponent[In]

    A Sink that sends data outside the stream, calculates a result, and/or has some other useful side effects.

  36. sealed trait StreamProducer[+Out] extends StreamInput[Out]

    A Source that produces data by repeatedly calling the user-provided function producer.

  37. trait SyncMultiTransform[-In, +Out] extends UserTransform[In, Out] with SyncFunc[In, Iterable[Out]]

    Implement this trait (at least the onNext method) to create a new synchronous one-to-one Transform.

  38. trait SyncSingleTransform[-In, +Out] extends UserTransform[In, Out] with SyncFunc[In, Out]

    Implement this trait (at least the onNext method) to create a new synchronous one-to-one Transform.

  39. trait SyncStreamConsumer[-In, +Res] extends StreamConsumer[In, Res] with SyncFunc[In, Unit] with NewBuilder

    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.

  40. trait SyncStreamProducer[+Out] extends StreamProducer[Out] with SyncFunc[Unit, Out] with NewBuilder

    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.

  41. sealed trait Transform[-In, +Out] extends SourceComponentBase[Out] with SinkComponentBase[In]

    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.

  42. sealed trait UserTransform[-In, +Out] extends Transform[In, Out] with NewBuilder

    Common supertrait of the non-sealed traits the user can extend to implement a Transform.

Value Members

  1. object Connector

  2. object DelayedPipe extends Serializable

  3. object MultiTransform extends Serializable

  4. object Pipe extends Serializable

  5. object SimpleOutput extends Serializable

  6. object SingleTransform extends Serializable

  7. object Sink extends Serializable

  8. object SinkComponent

  9. object Source extends Serializable

  10. object SourceComponent

  11. object Transform

  12. val emptyIterable: Iterable[Nothing]

  13. val futureEmptyIterable: Future[Iterable[Nothing]]

  14. val futureSuccess: Future[Unit]

  15. package run

Inherited from AnyRef

Inherited from Any

Ungrouped