Enum Class ReactiveStreamsBackpressureStrategy
java.lang.Object
java.lang.Enum<ReactiveStreamsBackpressureStrategy>
org.apache.camel.component.reactive.streams.ReactiveStreamsBackpressureStrategy
- All Implemented Interfaces:
Serializable
,Comparable<ReactiveStreamsBackpressureStrategy>
,Constable
A list of possible backpressure strategy to use when the emission of upstream items cannot respect backpressure.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBuffers all onNext values until the downstream consumes it.Keeps only the latest onNext value, overwriting any previous value if the downstream can't keep up.Keeps only the oldest onNext value, discarding any future value until it's consumed by the downstream subscriber. -
Method Summary
Modifier and TypeMethodDescriptionabstract <T> Collection<T>
Updates the buffer and returns a list of discarded elements (if any).Returns the enum constant of this class with the specified name.static ReactiveStreamsBackpressureStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BUFFER
Buffers all onNext values until the downstream consumes it. -
OLDEST
Keeps only the oldest onNext value, discarding any future value until it's consumed by the downstream subscriber. -
LATEST
Keeps only the latest onNext value, 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
-
update
Updates the buffer and returns a list of discarded elements (if any).- Type Parameters:
T
- the generic type of the element- Parameters:
buffer
- the buffer to updatenewItem
- the elment that should possibly be inserted- Returns:
- the list of discarded elements
-