Enum Class BackpressureStrategy

java.lang.Object
java.lang.Enum<BackpressureStrategy>
io.reactivex.rxjava3.core.BackpressureStrategy
All Implemented Interfaces:
Serializable, Comparable<BackpressureStrategy>, Constable

public enum BackpressureStrategy extends Enum<BackpressureStrategy>
Represents the options for applying backpressure to a source sequence.
  • Enum Constant Details

    • MISSING

      public static final BackpressureStrategy MISSING
      The onNext events are written without any buffering or dropping. Downstream has to deal with any overflow.

      Useful when one applies one of the custom-parameter onBackpressureXXX operators.

    • ERROR

      public static final BackpressureStrategy ERROR
      Signals a MissingBackpressureException in case the downstream can't keep up.
    • BUFFER

      public static final BackpressureStrategy BUFFER
      Buffers all onNext values until the downstream consumes it.
    • DROP

      public static final BackpressureStrategy DROP
      Drops the most recent onNext value if the downstream can't keep up.
    • LATEST

      public static final BackpressureStrategy LATEST
      Keeps only the latest onNext value, overwriting any previous value if the downstream can't keep up.
  • Constructor Details

    • BackpressureStrategy

      private BackpressureStrategy()
  • 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