Enum Class BackPressureStrategy

java.lang.Object
java.lang.Enum<BackPressureStrategy>
io.smallrye.mutiny.subscription.BackPressureStrategy
All Implemented Interfaces:
Serializable, Comparable<BackPressureStrategy>, Constable

public enum BackPressureStrategy extends Enum<BackPressureStrategy>
The back pressure strategies.
  • Enum Constant Details

    • BUFFER

      public static final BackPressureStrategy BUFFER
      Buffer the events. While being generally the default, be aware that this strategy may cause OutOfMemoryError as it uses unbounded buffer.
    • DROP

      public static final BackPressureStrategy DROP
      Drop the incoming item events if the downstream is not ready to receive it.
    • ERROR

      public static final BackPressureStrategy ERROR
      Fire a failure with a BackPressureFailure when the downstream can't keep up
    • IGNORE

      public static final BackPressureStrategy IGNORE
      Ignore downstream back-pressure requests. Basically it pushes items downstream as they come.

      This may cause an BackPressureFailure to be fired when queues get full downstream.

    • LATEST

      public static final BackPressureStrategy LATEST
      Drop the oldest item events from the buffer so the downstream will get only the latest items from upstream.
  • Method Details

    • values

      public static BackPressureStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BackPressureStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null