public enum ReactiveStreamsBackpressureStrategy extends Enum<ReactiveStreamsBackpressureStrategy>
| Enum Constant and Description |
|---|
BUFFER
Buffers all onNext values until the downstream consumes it.
|
LATEST
Keeps only the latest onNext value, overwriting any previous value if the downstream can't keep up.
|
OLDEST
Keeps only the oldest onNext value, discarding any future value until it's consumed by the downstream subscriber.
|
| Modifier and Type | Method and Description |
|---|---|
abstract <T> Collection<T> |
update(Deque<T> buffer,
T newItem)
Updates the buffer and returns a list of discarded elements (if any).
|
static ReactiveStreamsBackpressureStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReactiveStreamsBackpressureStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReactiveStreamsBackpressureStrategy BUFFER
public static final ReactiveStreamsBackpressureStrategy OLDEST
public static final ReactiveStreamsBackpressureStrategy LATEST
public static ReactiveStreamsBackpressureStrategy[] values()
for (ReactiveStreamsBackpressureStrategy c : ReactiveStreamsBackpressureStrategy.values()) System.out.println(c);
public static ReactiveStreamsBackpressureStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract <T> Collection<T> update(Deque<T> buffer, T newItem)
T - the generic type of the elementbuffer - the buffer to updatenewItem - the elment that should possibly be insertedApache Camel