- java.lang.Object
-
- java.lang.Enum<BackPressureStrategy>
-
- io.smallrye.mutiny.subscription.BackPressureStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BackPressureStrategy>
public enum BackPressureStrategy extends java.lang.Enum<BackPressureStrategy>
The back pressure strategies.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUFFER
Buffer the events.DROP
Drop the incoming item events if the downstream is not ready to receive it.ERROR
Fire a failure with aBackPressureFailure
when the downstream can't keep upIGNORE
Ignore downstream back-pressure requests.LATEST
Drop the oldest item events from the buffer so the downstream will get only the latest items from upstream.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BackPressureStrategy
valueOf(java.lang.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
-
BUFFER
public static final BackPressureStrategy BUFFER
Buffer the events. While being generally the default, be aware that this strategy may causeOutOfMemoryError
as it uses unbounded buffer.
-
DROP
public static final BackPressureStrategy DROP
Drop the incoming item events if the downstream is not ready to receive it.
-
ERROR
public static final BackPressureStrategy ERROR
Fire a failure with aBackPressureFailure
when the downstream can't keep up
-
IGNORE
public static final BackPressureStrategy IGNORE
Ignore downstream back-pressure requests. Basically it pushes items downstream as they come.This may cause an
BackPressureFailure
to be fired when queues get full downstream.
-
LATEST
public static final BackPressureStrategy LATEST
Drop the oldest item events from the buffer so the downstream will get only the latest items 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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-