Enum Class BackpressureStrategy

All Implemented Interfaces:
Serializable, Comparable<BackpressureStrategy>, Constable

public enum BackpressureStrategy extends Enum<BackpressureStrategy>
Strategy for applying backpressure to the reactive stream of response data.
  • Enum Constant Details

    • LINEAR

      public static final BackpressureStrategy LINEAR
      Data chunks are requested one-by-one after previous data chunk has been given to Netty for writing. When backpressure-buffer-size watermark is reached new chunks are not requested until buffer size decrease under the watermark value.

      public static final BackpressureStrategy AUTO_FLUSH
      Data are requested one-by-one, in case buffer reaches watermark, no other data is requested and extra flush is initiated.

      public static final BackpressureStrategy PREFETCH
      After first data chunk arrives, expected number of chunks needed to fill the buffer up to watermark is calculated and requested.

      public static final BackpressureStrategy UNBOUNDED
      No backpressure is applied, Long.MAX_VALUE(unbounded) is requested 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.
      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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null