p

colossus

streaming

package streaming

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. streaming
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class BufferedPipe [T] extends Pipe[T, T]

    A pipe backed by a fixed-length buffer.

    A pipe backed by a fixed-length buffer. Items can be pushed into the buffer until it fills, at which point the Full PushResult is returned. When items are pulled out of the pipe the signal return in the Full result is fired.

    The most efficient way to use a BufferedPipe is with the pullWhile method. This allows the pipe to completely bypass buffering and items pushed to the pipe are fast-tracked directly into the provided processing function.

  2. class Channel [I, O] extends Pipe[I, O]
  3. trait CircuitBreaker [T <: Transport] extends AnyRef
  4. class DualSource [T] extends Source[T] with BasicMethods[T]

    Wraps 2 sinks and will automatically begin reading from the second only when the first is empty.

    Wraps 2 sinks and will automatically begin reading from the second only when the first is empty. The None from the first sink is never exposed. The first error reported from either sink is propagated.

  5. trait Functor [F[_]] extends AnyRef
  6. implicit final class FunctorOps [F[_], A] extends AnyVal
  7. class InternalTransportClosedException extends Exception
  8. trait MultiStream [K, T] extends Stream[T]
  9. sealed trait NEPullResult [+T] extends PullResult[T]
  10. sealed trait NonOpenTransportState extends TransportState
  11. sealed trait NullPullResult extends PullResult[Nothing]
  12. trait Pipe [I, O] extends Sink[I] with Source[O]

    A Pipe is an abstraction that mediates interactions between producers and consumers of a stream of data.

    A Pipe is an abstraction that mediates interactions between producers and consumers of a stream of data. It can be thought of as a mutable buffer that has built-in features for addressing both back-pressure (when the pipe "fills") and forward-pressure (when the pipe "empties"). Items are "pushed" into the pipe and "pulled" out of it.

    A Pipe is the combination of the Source and Sink traits, representing the producer and consumer interfaces, respectively. It should be noted that a Pipe does not contain additional state beyond that provided by the Source and Sink interfaces. In other words, it may be possible for the producer Sink side of a pipe to be Closed or Terminated, while the consumer Source side is in a different state.

    The canonical implementation is the BufferedPipe, backed by a fixed-length buffer. However pipes have many monadic and combinatorial capabilities, allowing them to be mapped, linked together, flattened, and multiplexed.

    As opposed to other libraries/frameworks that have a concept of streams, sources, and sinks, these pipes are intended for low-level stream management. They support several features that allow interation with pipes to be very fast and efficient. They form the backbone of all connection handlers and as well as streaming protocols like http/2. Pipes are *not* thread-safe.

  13. class PipeCircuitBreaker [I, O] extends Pipe[I, O] with CircuitBreaker[Pipe[I, O]] with SourceCircuitBreaker[O, Pipe[I, O]] with SinkCircuitBreaker[I, Pipe[I, O]]
  14. sealed trait PipeException extends Throwable
  15. implicit final class PipeOps [A, B] extends AnyVal
  16. class PipeStateException extends Exception with PipeException
  17. class PipeTerminatedException extends Exception with PipeException
  18. sealed trait PullAction extends AnyRef
  19. sealed trait PullResult [+T] extends AnyRef
  20. sealed trait PushResult extends AnyRef
  21. trait Signal extends AnyRef

    A Signal is a callback mechanism used by both Source and Sink to manage forward/back-pressure.

    A Signal is a callback mechanism used by both Source and Sink to manage forward/back-pressure. In both cases it is returned when a requested operation cannot immediately complete, but can at a later point in time. For example, when pulling from a Source, if no item is immediately available, a signal is returned that will be triggered when an item is available to pull.

    val stream: Source[Int] = //...
    stream.pull() match {
     case PullResult.Item(num) => //...
     case PullResult.Full(signal) => signal.notify {
       //when this callback function is called, it is guaranteed that an item is now available
       stream.pull()//...
     }
    }

    Signals are multi-listener, so that multiple consumers can attach callbacks to a single listener. Callbacks are fired in the order they are queued, and generally conditions for triggering a signal are re-checked for each listener (so that, for example, if one item is pushed to an empty Source, only one listener is signaled).

  22. trait Sink [-T] extends Transport

    A Sink is the write side of a pipe.

    A Sink is the write side of a pipe. It allows you to push items to it, and will return whether or not it can accept more data. In the case where the pipe is full, the Sink will return a mutable Trigger and you can attach a callback to for when the pipe can receive more items

  23. trait SinkCircuitBreaker [A, T <: Sink[A]] extends Sink[A]
  24. trait Source [+T] extends Transport

    A Source is the read interface for a Pipe.

    A Source is the read interface for a Pipe. Items can be pulled out of the source if available. When no item is available, a returned Signal can be used to be notified when items are available.

    Sources can be mapped using the functionality provided in the SourceMapper typeclass

  25. trait SourceCircuitBreaker [A, T <: Source[A]] extends BasicMethods[A]
  26. implicit final class SourceOps [A] extends AnyVal
  27. trait Stream [T] extends AnyRef
  28. sealed trait StreamComponent extends AnyRef
  29. abstract class StreamTranscodingController [U <: Encoding, D <: Encoding] extends ControllerDownstream[U] with DownstreamEventHandler[ControllerDownstream[D]] with ControllerUpstream[D] with UpstreamEventHandler[ControllerUpstream[U]]

    This controller interface can be used to transcode from one encoding to another in a connection handler pipeline

  30. case class SubSink [K, T](id: K, stream: Sink[T]) extends Product with Serializable
  31. case class SubSource [K, T](id: K, stream: Source[T]) extends Product with Serializable
  32. sealed trait TerminalPullResult extends NullPullResult
  33. trait Transcoder [U <: Encoding, D <: Encoding] extends AnyRef

    A Transcoder is used to convert streams of one encoding to streams of another.

    A Transcoder is used to convert streams of one encoding to streams of another. The two streams are intended to be part of a duplex pipeline, so input is transcoded from A to B, and output is transcoded the other way B to A

  34. trait Transport extends AnyRef

    This is the base type of both Source and Sink

  35. sealed trait TransportState extends AnyRef
  36. class Trigger extends Signal

    When a user attempts to push a value into a pipe, and the pipe either fills or was already full, a Trigger is returned in the PushResult.

    When a user attempts to push a value into a pipe, and the pipe either fills or was already full, a Trigger is returned in the PushResult. This is essentially just a fillable callback function that is called when the pipe either becomes empty or is closed or terminated

    Notice that when the trigger is executed we don't include any information about the state of the pipe. The handler can just try pushing again to determine if the pipe is dead or not.

Value Members

  1. object Channel
  2. object Multiplexing

    Multiplexing is the process of combining multiple independant streams into a single stream.

    Multiplexing is the process of combining multiple independant streams into a single stream. Each message in the multiplexed stream carries information about which sub-stream it originated from, so that eventually the stream can be demultiplexed back into the constituent sub-streams.

    By multiplexing a "base" Sink[T], a new Sink[SubSource[K,T]] is created, with each SubSource containing a Source[T]. When a Source is pushed into the multiplexing sink, all messages pushed to that source are routed into the base sink.

    Likewise, demultiplexing a multiplexed Source[T] will create a Source[SubSource[K,T]], with each Subsource being one of the sub-streams being fed into the multiplexed source.

  3. object PullAction

    A PullAction is the return type of a processing function passed to Source.pullWhile method.

    A PullAction is the return type of a processing function passed to Source.pullWhile method. It signals to the source what action should be taken after the processing function has processed the next item from the source.

  4. object PullResult
  5. object PushResult
  6. object Sink
  7. object Source
  8. implicit object SourceFilterMapper
  9. implicit object SourceMapper extends Functor[Source]
  10. object StreamComponent
  11. object TransportState

Inherited from AnyRef

Inherited from Any

Ungrouped