Class Attributes.CancellationStrategy$.AfterDelay

java.lang.Object
org.apache.pekko.stream.Attributes.CancellationStrategy$.AfterDelay
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product
Enclosing class:
Attributes.CancellationStrategy$

public static final class Attributes.CancellationStrategy$.AfterDelay extends Object implements scala.Product, Serializable
Strategy that allows to delay any action when cancelStage is invoked.

The idea of this strategy is to delay any action on cancellation because it is expected that the stage is completed through another path in the meantime. The downside is that a stage and a stream may live longer than expected if no such signal is received and cancellation is invoked later on. In streams with many stages that all apply this strategy, this strategy might significantly delay the propagation of a cancellation signal because each upstream stage might impose such a delay. During this time, the stream will be mostly "silent", i.e. it cannot make progress because of backpressure, but you might still be able observe a long delay at the ultimate source.

See Also:
  • Constructor Details

    • AfterDelay

      public AfterDelay(scala.concurrent.duration.FiniteDuration delay, org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy)
  • Method Details

    • delay

      public scala.concurrent.duration.FiniteDuration delay()
    • strategy

      public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy()
    • copy

      public org.apache.pekko.stream.Attributes.CancellationStrategy.AfterDelay copy(scala.concurrent.duration.FiniteDuration delay, org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy strategy)
    • copy$default$1

      public scala.concurrent.duration.FiniteDuration copy$default$1()
    • copy$default$2

      public org.apache.pekko.stream.Attributes.CancellationStrategy.Strategy copy$default$2()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object