colossus.streaming

BufferedPipe

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

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.

Linear Supertypes
Pipe[T, T], Source[T], Sink[T], Transport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BufferedPipe
  2. Pipe
  3. Source
  4. Sink
  5. Transport
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BufferedPipe(size: Int)

Type Members

  1. case class Dead(reason: Throwable) extends State with Product with Serializable

  2. case class PullFastTrack(fn: (T) ⇒ PullAction, onComplete: (TerminalPullResult) ⇒ Any) extends PushableState with Product with Serializable

  3. sealed trait PushableState extends State

  4. sealed trait State extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def ++[U >: T](next: Source[U]): Source[U]

    Definition Classes
    Source
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. object Active extends PushableState with Product with Serializable

  8. object Closed extends State with Product with Serializable

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def canPullNonEmpty: Boolean

    Definition Classes
    Source
  11. def canPush: Boolean

    Definition Classes
    Sink
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def collected: Callback[Iterator[T]]

    Definition Classes
    Source
  14. def complete(): Try[Unit]

    Definition Classes
    BufferedPipeSink
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def filterScan(f: (T) ⇒ Boolean): Unit

    Iterate through all buffered items, removing any where the provided function returns true

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def fold[U](init: U)(cb: (T, U) ⇒ U): Callback[U]

    Definition Classes
    Source
  20. def foldWhile[U](init: U)(cb: (T, U) ⇒ U)(f: (U) ⇒ Boolean): Callback[U]

    Definition Classes
    Source
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. def head: T

  24. def inputState: TransportState

    Definition Classes
    BufferedPipeSink
  25. def into[X >: T](sink: Sink[X]): Unit

    Definition Classes
    Source
  26. def into[X >: T](sink: Sink[X], linkClosed: Boolean, linkTerminated: Boolean)(onComplete: (NonOpenTransportState) ⇒ Any): Unit

    Link this source to a sink.

    Link this source to a sink. Items will be pulled from the source and pushed to the sink, respecting backpressure, until either the source is closed or an error occurs. The linkClosed and linkTerminated parameters determine whether to propagate closure/termination of this Source to the linked Sink. However if the sink is closed or terminated first, this source will be terminated.

    sink

    The sink to link to this source

    linkClosed

    if true, the linked sink will be closed when this source is closed

    linkTerminated

    if true, the linked sink will be terminated when this source is terminated

    Definition Classes
    Source
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def length: Int

  29. def mapIn[A](f: (A) ⇒ T): Sink[A]

    Definition Classes
    Sink
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def outputState: TransportState

    Definition Classes
    BufferedPipeSource
  34. def peek: PullResult[T]

    Definition Classes
    BufferedPipeSource
  35. def pull(): PullResult[T]

    Pull the next item from the Source if available.

    Pull the next item from the Source if available. The returned PullResult will indicate whether an item was successfully pulled.

    Definition Classes
    BufferedPipeSource
  36. def pull(whenReady: (Try[Option[T]]) ⇒ Unit): Unit

    Definition Classes
    Source
  37. def pullCB(): Callback[Option[T]]

    Definition Classes
    Source
  38. def pullUntilNull(fn: (T) ⇒ Boolean): Option[NullPullResult]

    Pull until either the supplied function returns false or there are no more items immediately available to pull, in which case a Some[NullPullResult] is returned indicating why the loop stopped.

    Pull until either the supplied function returns false or there are no more items immediately available to pull, in which case a Some[NullPullResult] is returned indicating why the loop stopped.

    Definition Classes
    BufferedPipeSource
  39. def pullWhile(fn: (T) ⇒ PullAction, onComplete: (TerminalPullResult) ⇒ Any): Unit

    Repeatedly pull items out of a pipe, even if items are not immediately available.

    Repeatedly pull items out of a pipe, even if items are not immediately available. The Source will hold onto the given processing function and immediately forward items into it as they become available. The returned PullAction determines how the Source will proceed with the next item. If PullContinue or Wait are returned, the Source will hold onto the processing function for either when the next item is available or when the returned Signal is fired. onComplete is only called if the Source is closed or terminated while the processing function is in use.

    When Wait is returned, the item that was passed into the processing function is _not_ pulled from the source. Thus when the returned signal is fired and processing resumes, the same item will be passed to the processing function.

    This method is generally intended for linking the output of a Source to the input of a Sink. For a simplified version of this functionality, see Source.into.

    Definition Classes
    BufferedPipeSource
  40. def push(item: T): PushResult

    Attempt to push a value into the pipe.

    Attempt to push a value into the pipe.

    The value will only be successfully pushed only if there has already a been a request for data on the pulling side. In other words, the pipe will never interally queue a value.

    returns

    the result of the push

    Definition Classes
    BufferedPipeSink
  41. def pushPeek: PushResult

    Definition Classes
    BufferedPipeSink
  42. def reduce[U >: T](reducer: (U, U) ⇒ U): Callback[U]

    Definition Classes
    Source
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def terminate(reason: Throwable): Unit

    Immediately terminate the transport, permenantly putting it into an error state

    Immediately terminate the transport, permenantly putting it into an error state

    Definition Classes
    BufferedPipeTransport
  45. def toString(): String

    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. def weld[U >: T, T](next: Pipe[U, T]): Pipe[T, T]

    Definition Classes
    Pipe

Inherited from Pipe[T, T]

Inherited from Source[T]

Inherited from Sink[T]

Inherited from Transport

Inherited from AnyRef

Inherited from Any

Ungrouped