object MergeSequence

Takes multiple streams whose elements in aggregate have a defined linear sequence with difference 1, starting at 0, and outputs a single stream containing these elements, in order. That is, given a set of input streams with combined elements *ek*:

*e0*, *e1*, *e2*, ..., *en*

This will output a stream ordered by *k*.

The elements in the input streams must already be sorted according to the sequence. The input streams do not need to be linear, but the aggregate stream must be linear, no element *k* may be skipped or duplicated, either of these conditions will cause the stream to fail.

The typical use case for this is to merge a partitioned stream back together while maintaining order. This can be achieved by first using zipWithIndex on the input stream, then partitioning using a Partition fanout, and then maintaining the index through the processing of each partition before bringing together with this stage.

Emits when one of the upstreams has the next expected element in the sequence available.

Backpressures when downstream backpressures

Completes when all upstreams complete

Cancels when downstream cancels

Source
Graph.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MergeSequence
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. def create[T](clazz: Class[T], inputCount: Int, extractSequence: Function[T, Long]): Graph[UniformFanInShape[T, T], NotUsed]

    Create a new anonymous Concat operator with the specified input types.

    Create a new anonymous Concat operator with the specified input types.

    clazz

    a type hint for this method

    inputCount

    The number of input streams.

    extractSequence

    The function to extract the sequence from an element.

  7. def create[T](inputCount: Int, extractSequence: Function[T, Long]): Graph[UniformFanInShape[T, T], NotUsed]

    Create a new anonymous MergeSequence operator.

    Create a new anonymous MergeSequence operator.

    inputCount

    The number of input streams.

    extractSequence

    The function to extract the sequence from an element.

  8. def create[T](extractSequence: Function[T, Long]): Graph[UniformFanInShape[T, T], NotUsed]

    Create a new anonymous MergeSequence operator with two input ports.

    Create a new anonymous MergeSequence operator with two input ports.

    extractSequence

    The function to extract the sequence from an element.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped