Interface FlowWithContextOps<Ctx,​Out,​Mat>

    • Method Detail

      • collect

        <Out2> FlowWithContextOps collect​(scala.PartialFunction<Out,​Out2> f)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.collect.

        Note, that the context of elements that are filtered out is skipped as well.

        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.collect
      • filter

        FlowWithContextOps filter​(scala.Function1<Out,​java.lang.Object> pred)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.filter.

        Note, that the context of elements that are filtered out is skipped as well.

        Parameters:
        pred - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.filter
      • filterNot

        FlowWithContextOps filterNot​(scala.Function1<Out,​java.lang.Object> pred)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.filterNot.

        Note, that the context of elements that are filtered out is skipped as well.

        Parameters:
        pred - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.filterNot
      • flow

        <T,​C> Flow<scala.Tuple2<T,​C>,​scala.Tuple2<T,​C>,​NotUsed> flow()
      • grouped

        FlowWithContextOps grouped​(int n)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.grouped.

        Each output group will be associated with a Seq of corresponding context elements.

        Parameters:
        n - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.grouped
      • map

        <Out2> FlowWithContextOps map​(scala.Function1<Out,​Out2> f)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.map.

        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.map
      • mapAsync

        <Out2> FlowWithContextOps mapAsync​(int parallelism,
                                           scala.Function1<Out,​scala.concurrent.Future<Out2>> f)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.mapAsync.

        Parameters:
        parallelism - (undocumented)
        f - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.mapAsync
      • mapConcat

        <Out2> FlowWithContextOps mapConcat​(scala.Function1<Out,​scala.collection.immutable.Iterable<Out2>> f)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.mapConcat.

        The context of the input element will be associated with each of the output elements calculated from this input element.

        Example:

        def dup(element: String) = Seq(element, element)

        Input:

        ("a", 1) ("b", 2)

        inputElements.mapConcat(dup)

        Output:

        ("a", 1) ("a", 1) ("b", 2) ("b", 2)

        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.mapConcat
      • mapContext

        <Ctx2> FlowWithContextOps mapContext​(scala.Function1<Ctx,​Ctx2> f)
        Apply the given function to each context element (leaving the data elements unchanged).
        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
      • sliding

        FlowWithContextOps sliding​(int n,
                                   int step)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.sliding.

        Each output group will be associated with a Seq of corresponding context elements.

        Parameters:
        n - (undocumented)
        step - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.sliding
      • sliding$default$2

        int sliding$default$2()
      • statefulMapConcat

        <Out2> FlowWithContextOps statefulMapConcat​(scala.Function0<scala.Function1<Out,​scala.collection.immutable.Iterable<Out2>>> f)
        Context-preserving variant of akka.stream.scaladsl.FlowOps.statefulMapConcat.

        The context of the input element will be associated with each of the output elements calculated from this input element.

        Example:

        val statefulRepeat: () ⇒ String ⇒ collection.immutable.Iterable[String] = () ⇒ { var counter = 0 str ⇒ { counter = counter + 1 (1 to counter).map(_ ⇒ str) } }

        Input:

        ("a", 4) ("b", 5) ("c", 6)

        inputElements.statefulMapConcat(statefulRepeat)

        Output:

        ("a", 4) ("b", 5) ("b", 5) ("c", 6) ("c", 6) ("c", 6)

        Parameters:
        f - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.statefulMapConcat
      • via

        <Ctx2,​Out2,​Mat2> FlowWithContextOps via​(Graph<FlowShape<scala.Tuple2<Out,​Ctx>,​scala.Tuple2<Out2,​Ctx2>>,​Mat2> flow)
        Transform this flow by the regular flow. The given flow must support manual context propagation by taking and producing tuples of (data, context).

        This can be used as an escape hatch for operations that are not (yet) provided with automatic context propagation here.

        Parameters:
        flow - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.via
      • viaMat

        <Ctx2,​Out2,​Mat2,​Mat3> FlowWithContextOps viaMat​(Graph<FlowShape<scala.Tuple2<Out,​Ctx>,​scala.Tuple2<Out2,​Ctx2>>,​Mat2> flow,
                                                                          scala.Function2<Mat,​Mat2,​Mat3> combine)
        Transform this flow by the regular flow. The given flow must support manual context propagation by taking and producing tuples of (data, context).

        This can be used as an escape hatch for operations that are not (yet) provided with automatic context propagation here.

        The combine function is used to compose the materialized values of this flow and that flow into the materialized value of the resulting Flow.

        Parameters:
        flow - (undocumented)
        combine - (undocumented)
        Returns:
        (undocumented)
        See Also:
        akka.stream.scaladsl.FlowOps.viaMat