Package akka.stream

Class Attributes.NestedMaterializationCancellationPolicy

  • All Implemented Interfaces:
    Attributes.Attribute, Attributes.MandatoryAttribute
    Enclosing class:
    Attributes

    public static final class Attributes.NestedMaterializationCancellationPolicy
    extends java.lang.Object
    implements Attributes.MandatoryAttribute
    Nested materialization cancellation strategy provides a way to configure the cancellation behavior of stages that materialize a nested flow.

    When cancelled before materializing their nested flows, these stages can either immediately cancel (default behaviour) without materializing the nested flow or wait for the nested flow to materialize and then propagate the cancellation signal through it.

    This applies to akka.stream.scaladsl.FlowOps.flatMapPrefix, akka.stream.scaladsl.Flow.futureFlow (and derivations such as akka.stream.scaladsl.Flow.lazyFutureFlow). These operators either delay the nested flow's materialization or wait for a future to complete before doing so, in this period of time they may receive a downstream cancellation signal. When this happens these operators will behave according to this Attributes.Attribute: when set to true they will 'stash' the signal and later deliver it to the materialized nested flow , otherwise these stages will immediately cancel without materializing the nested flow.

    • Method Detail

      • propagateToNestedMaterialization

        public boolean propagateToNestedMaterialization()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object