Enum Class BackpressureStrategy

java.lang.Object
java.lang.Enum<BackpressureStrategy>
io.helidon.webserver.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.
    • AUTO_FLUSH

      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.
    • PREFETCH

      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.
    • UNBOUNDED

      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.
      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