- All Implemented Interfaces:
Serializable
,Comparable<BackpressureStrategy>
,Constable
Strategy for applying backpressure to the reactive stream of response data.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionData are requested one-by-one, in case buffer reaches watermark, no other data is requested and extra flush is initiated.Data chunks are requested one-by-one after previous data chunk has been given to Netty for writing.After first data chunk arrives, expected number of chunks needed to fill the buffer up to watermark is calculated and requested.No backpressure is applied, Long.MAX_VALUE(unbounded) is requested from upstream. -
Method Summary
Modifier and TypeMethodDescriptionstatic BackpressureStrategy
Returns the enum constant of this class with the specified name.static BackpressureStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Data are requested one-by-one, in case buffer reaches watermark, no other data is requested and extra flush is initiated. -
PREFETCH
After first data chunk arrives, expected number of chunks needed to fill the buffer up to watermark is calculated and requested. -
UNBOUNDED
No backpressure is applied, Long.MAX_VALUE(unbounded) is requested from upstream.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-