final class FlowWithContext[-In, -CtxIn, +Out, +CtxOut, +Mat] extends GraphDelegate[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat] with FlowWithContextOps[Out, CtxOut, Mat]
A flow that provides operations which automatically propagate the context of an element. Only a subset of common operations from FlowOps is supported. As an escape hatch you can use FlowWithContextOps.via to manually provide the context propagation for otherwise unsupported operations.
An "empty" flow can be created by calling FlowWithContext[Ctx, T]
.
API MAY CHANGE
- Annotations
- @ApiMayChange()
- Source
- FlowWithContext.scala
- Alphabetic
- By Inheritance
- FlowWithContext
- FlowWithContextOps
- GraphDelegate
- Graph
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
type
Repr[+O, +C] = ReprMat[O, C, Mat]
- Definition Classes
- FlowWithContextOps
-
type
ReprMat[+O, +C, +M] = FlowWithContext[In, CtxIn, O, C, M]
- Definition Classes
- FlowWithContext → FlowWithContextOps
-
type
Shape = FlowShape[(In, CtxIn), (Out, CtxOut)]
Type-level accessor for the shape parameter of this graph.
Type-level accessor for the shape parameter of this graph.
- Definition Classes
- Graph
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to any2stringadd[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (FlowWithContext[In, CtxIn, Out, CtxOut, Mat], B)
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to ArrowAssoc[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addAttributes(attr: Attributes): Graph[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]
Add the given attributes to this Graph.
Add the given attributes to this Graph. If the specific attribute was already present on this graph this means the added attribute will be more specific than the existing one. If this Source is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.
- Definition Classes
- Graph
- def asFlow: Flow[(In, CtxIn), (Out, CtxOut), Mat]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava[JIn <: In, JCtxIn <: CtxIn, JOut >: Out, JCtxOut >: CtxOut, JMat >: Mat]: javadsl.FlowWithContext[JIn, JCtxIn, JOut, JCtxOut, JMat]
-
def
async(dispatcher: String, inputBufferSize: Int): Graph[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]
Put an asynchronous boundary around this
Graph
Put an asynchronous boundary around this
Graph
- dispatcher
Run the graph on this dispatcher
- inputBufferSize
Set the input buffer to this size for the graph
- Definition Classes
- Graph
-
def
async(dispatcher: String): Graph[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]
Put an asynchronous boundary around this
Graph
Put an asynchronous boundary around this
Graph
- dispatcher
Run the graph on this dispatcher
- Definition Classes
- Graph
-
def
async: Graph[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]
Put an asynchronous boundary around this
Graph
Put an asynchronous boundary around this
Graph
- Definition Classes
- Graph
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
def
collect[Out2](f: PartialFunction[Out, Out2]): Repr[Out2, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.collect.
Context-preserving variant of akka.stream.scaladsl.FlowOps.collect.
Note, that the context of elements that are filtered out is skipped as well.
- Definition Classes
- FlowWithContextOps
- See also
-
def
ensuring(cond: (FlowWithContext[In, CtxIn, Out, CtxOut, Mat]) ⇒ Boolean, msg: ⇒ Any): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (FlowWithContext[In, CtxIn, Out, CtxOut, Mat]) ⇒ Boolean): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to Ensuring[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(pred: (Out) ⇒ Boolean): Repr[Out, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.filter.
Context-preserving variant of akka.stream.scaladsl.FlowOps.filter.
Note, that the context of elements that are filtered out is skipped as well.
- Definition Classes
- FlowWithContextOps
- See also
-
def
filterNot(pred: (Out) ⇒ Boolean): Repr[Out, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.filterNot.
Context-preserving variant of akka.stream.scaladsl.FlowOps.filterNot.
Note, that the context of elements that are filtered out is skipped as well.
- Definition Classes
- FlowWithContextOps
- See also
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to StringFormat[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
grouped(n: Int): Repr[Seq[Out], Seq[CtxOut]]
Context-preserving variant of akka.stream.scaladsl.FlowOps.grouped.
Context-preserving variant of akka.stream.scaladsl.FlowOps.grouped.
Each output group will be associated with a
Seq
of corresponding context elements.- Definition Classes
- FlowWithContextOps
- See also
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
log(name: String, extract: (Out) ⇒ Any = ConstantFun.scalaIdentityFunction)(implicit log: LoggingAdapter = null): Repr[Out, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.log.
Context-preserving variant of akka.stream.scaladsl.FlowOps.log.
- Definition Classes
- FlowWithContextOps
- See also
-
def
map[Out2](f: (Out) ⇒ Out2): Repr[Out2, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.map.
Context-preserving variant of akka.stream.scaladsl.FlowOps.map.
- Definition Classes
- FlowWithContextOps
- See also
-
def
mapAsync[Out2](parallelism: Int)(f: (Out) ⇒ Future[Out2]): Repr[Out2, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.mapAsync.
Context-preserving variant of akka.stream.scaladsl.FlowOps.mapAsync.
- Definition Classes
- FlowWithContextOps
- See also
-
def
mapConcat[Out2](f: (Out) ⇒ Iterable[Out2]): Repr[Out2, CtxOut]
Context-preserving variant of akka.stream.scaladsl.FlowOps.mapConcat.
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)
- Definition Classes
- FlowWithContextOps
- See also
-
def
mapContext[Ctx2](f: (CtxOut) ⇒ Ctx2): Repr[Out, Ctx2]
Apply the given function to each context element (leaving the data elements unchanged).
Apply the given function to each context element (leaving the data elements unchanged).
- Definition Classes
- FlowWithContextOps
-
def
mapMaterializedValue[Mat2](f: (Mat) ⇒ Mat2): FlowWithContext[In, CtxIn, Out, CtxOut, Mat2]
Context-preserving variant of akka.stream.scaladsl.Flow.mapMaterializedValue.
Context-preserving variant of akka.stream.scaladsl.Flow.mapMaterializedValue.
-
def
named(name: String): Graph[FlowShape[(In, CtxIn), (Out, CtxOut)], Mat]
- Definition Classes
- Graph
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
shape: FlowShape[(In, CtxIn), (Out, CtxOut)]
The shape of a graph is all that is externally visible: its inlets and outlets.
The shape of a graph is all that is externally visible: its inlets and outlets.
- Definition Classes
- GraphDelegate → Graph
-
def
sliding(n: Int, step: Int = 1): Repr[Seq[Out], Seq[CtxOut]]
Context-preserving variant of akka.stream.scaladsl.FlowOps.sliding.
Context-preserving variant of akka.stream.scaladsl.FlowOps.sliding.
Each output group will be associated with a
Seq
of corresponding context elements.- Definition Classes
- FlowWithContextOps
- See also
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
via[Out2, Ctx2, Mat2](viaFlow: Graph[FlowShape[(Out, CtxOut), (Out2, Ctx2)], Mat2]): Repr[Out2, Ctx2]
Transform this flow by the regular 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.
- Definition Classes
- FlowWithContext → FlowWithContextOps
- See also
-
def
viaMat[Out2, Ctx2, Mat2, Mat3](flow: Graph[FlowShape[(Out, CtxOut), (Out2, Ctx2)], Mat2])(combine: (Mat, Mat2) ⇒ Mat3): FlowWithContext[In, CtxIn, Out2, Ctx2, Mat3]
Transform this flow by the regular 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.
The
combine
function is used to compose the materialized values of this flow and that flow into the materialized value of the resulting Flow.- Definition Classes
- FlowWithContext → FlowWithContextOps
- See also
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withAttributes(attr: Attributes): FlowWithContext[In, CtxIn, Out, CtxOut, Mat]
Context-preserving variant of akka.stream.scaladsl.Flow.withAttributes.
Context-preserving variant of akka.stream.scaladsl.Flow.withAttributes.
- Definition Classes
- FlowWithContext → Graph
- See also
-
def
→[B](y: B): (FlowWithContext[In, CtxIn, Out, CtxOut, Mat], B)
- Implicit
- This member is added by an implicit conversion from FlowWithContext[In, CtxIn, Out, CtxOut, Mat] to ArrowAssoc[FlowWithContext[In, CtxIn, Out, CtxOut, Mat]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc