Package io.reactivex.rxjava3.core
Enum BackpressureOverflowStrategy
- java.lang.Object
-
- java.lang.Enum<BackpressureOverflowStrategy>
-
- io.reactivex.rxjava3.core.BackpressureOverflowStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BackpressureOverflowStrategy>
public enum BackpressureOverflowStrategy extends java.lang.Enum<BackpressureOverflowStrategy>
Options to deal with buffer overflow when using onBackpressureBuffer.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DROP_LATEST
Drop the latest value from the buffer.DROP_OLDEST
Drop the oldest value from the buffer.ERROR
Signal aMissingBackpressureException
and terminate the sequence.
-
Constructor Summary
Constructors Modifier Constructor Description private
BackpressureOverflowStrategy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BackpressureOverflowStrategy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BackpressureOverflowStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ERROR
public static final BackpressureOverflowStrategy ERROR
Signal aMissingBackpressureException
and terminate the sequence.
-
DROP_OLDEST
public static final BackpressureOverflowStrategy DROP_OLDEST
Drop the oldest value from the buffer.
-
DROP_LATEST
public static final BackpressureOverflowStrategy DROP_LATEST
Drop the latest value from the buffer.
-
-
Method Detail
-
values
public static BackpressureOverflowStrategy[] 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 (BackpressureOverflowStrategy c : BackpressureOverflowStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BackpressureOverflowStrategy 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
-
-