BufferOverflow

A strategy for buffer overflow handling in channels and flows that controls what is going to be sacrificed on buffer overflow:

  • SUSPEND — the upstream that is sending or is emitting a value is suspended while the buffer is full.

  • DROP_OLDESTthe oldest value in the buffer is dropped on overflow, and the new value is added, all without suspending.

  • DROP_LATEST — the buffer remains unchanged on overflow, and the value that we were going to add gets discarded, all without suspending.

Entries

Link copied to clipboard

Suspend on buffer overflow.

Link copied to clipboard

Drop the oldest value in the buffer on overflow, add the new value to the buffer, do not suspend.

Link copied to clipboard

Leave the buffer unchanged on overflow, dropping the value that we were going to add, do not suspend.

Properties

Link copied to clipboard
val entries: EnumEntries<BufferOverflow>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Functions

Link copied to clipboard

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.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.