Enum Class BackpressureStrategy
- All Implemented Interfaces:
Serializable, Comparable<BackpressureStrategy>, Constable
Represents the options for applying backpressure to a source sequence.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBuffers allonNextvalues until the downstream consumes it.Drops the most recentonNextvalue if the downstream can't keep up.Signals aMissingBackpressureExceptionin case the downstream can't keep up.Keeps only the latestonNextvalue, overwriting any previous value if the downstream can't keep up.TheonNextevents are written without any buffering or dropping. -
Method Summary
Modifier and TypeMethodDescriptionstatic BackpressureStrategyReturns 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
-
MISSING
TheonNextevents 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
Signals aMissingBackpressureExceptionin case the downstream can't keep up. -
BUFFER
Buffers allonNextvalues until the downstream consumes it. -
DROP
Drops the most recentonNextvalue if the downstream can't keep up. -
LATEST
Keeps only the latestonNextvalue, overwriting any previous value if the downstream can't keep up.
-
-
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
-