- java.lang.Object
-
- java.lang.Enum<BackpressureStrategy>
-
- io.helidon.webserver.BackpressureStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<BackpressureStrategy>
public enum BackpressureStrategy extends Enum<BackpressureStrategy>
Strategy for applying backpressure to the reactive stream of response data.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO_FLUSH
Data are requested one-by-one, in case buffer reaches watermark, no other data is requested and extra flush is initiated.LINEAR
Data chunks are requested one-by-one after previous data chunk has been given to Netty for writing.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BackpressureStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static BackpressureStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static BackpressureStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BackpressureStrategy c : BackpressureStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BackpressureStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-