Class

colossus.streaming

DualSource

Related Doc: package streaming

Permalink

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. The None from the first sink is never exposed. The first error reported from either sink is propagated.

Linear Supertypes
BasicMethods[T], Source[T], Transport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DualSource
  2. BasicMethods
  3. Source
  4. Transport
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DualSource(a: Source[T], b: Source[T])

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    Source
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def canPullNonEmpty: Boolean

    Permalink
    Definition Classes
    Source
  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    Source
  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def into[X >: T](sink: Sink[X]): Unit

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

    Permalink

    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
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def outputState: TransportState

    Permalink
    Definition Classes
    DualSourceSource
  23. def peek: PullResult[T]

    Permalink
    Definition Classes
    DualSourceSource
  24. def pull(): PullResult[T]

    Permalink

    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
    DualSourceSource
  25. def pull(whenReady: (Try[Option[T]]) ⇒ Unit): Unit

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

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

    Permalink

    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
    Source
  28. def pullWhile(fn: (T) ⇒ PullAction, onComplete: (TerminalPullResult) ⇒ Any): Unit

    Permalink

    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
    BasicMethodsSource
  29. def reduce[U >: T](reducer: (U, U) ⇒ U): Callback[U]

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

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

    Permalink

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

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

    Definition Classes
    DualSourceTransport
  32. def toString(): String

    Permalink
    Definition Classes
    DualSource → AnyRef → Any
  33. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BasicMethods[T]

Inherited from Source[T]

Inherited from Transport

Inherited from AnyRef

Inherited from Any

Ungrouped