Class OverflowStrategy$

java.lang.Object
org.apache.pekko.stream.OverflowStrategy$
All Implemented Interfaces:
Serializable

public class OverflowStrategy$ extends Object implements Serializable
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OverflowStrategy$
    Static reference to the singleton instance of this Scala object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    If the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer.
    If the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element.
    If the buffer is full when a new element arrives, drops the oldest element from the buffer to make space for the new element.
    If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element.
    If the buffer is full when a new element is available this strategy completes the stream with failure.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MODULE$

      public static final OverflowStrategy$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • OverflowStrategy$

      public OverflowStrategy$()
  • Method Details

    • dropHead

      public OverflowStrategy dropHead()
      If the buffer is full when a new element arrives, drops the oldest element from the buffer to make space for the new element.
    • dropTail

      public OverflowStrategy dropTail()
      If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element.
    • dropBuffer

      public OverflowStrategy dropBuffer()
      If the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element.
    • backpressure

      public OverflowStrategy backpressure()
      If the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer.
    • fail

      public OverflowStrategy fail()
      If the buffer is full when a new element is available this strategy completes the stream with failure.