- All Implemented Interfaces:
Serializable,Comparable<BackPressureStrategy>,Constable
The back pressure strategies.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBuffer the events.Drop the incoming item events if the downstream is not ready to receive it.Fire a failure with aBackPressureFailurewhen the downstream can't keep upIgnore downstream back-pressure requests.Drop the oldest item events from the buffer so the downstream will get only the latest items from upstream. -
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
-
BUFFER
Buffer the events. While being generally the default, be aware that this strategy may causeOutOfMemoryErroras it uses unbounded buffer. -
DROP
Drop the incoming item events if the downstream is not ready to receive it. -
ERROR
Fire a failure with aBackPressureFailurewhen the downstream can't keep up -
IGNORE
Ignore downstream back-pressure requests. Basically it pushes items downstream as they come.This may cause an
BackPressureFailureto be fired when queues get full downstream. -
LATEST
Drop the oldest item events from the buffer so the downstream will get only the latest items 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
-