Skip to content

BackPressureStrategy

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

data class BackPressureStrategy(val capacity: Int, val onThresholdReached: () -> Unit, val onItemDropped: (Any) -> Unit, val backpressureMitigation: BackPressureMitigation)

Parameters

capacity the maximum size of the queue
onThresholdReached callback called when the queue reaches full capacity
onItemDropped called when an item is dropped because of this backpressure strategy
backpressureMitigation the mitigation to use when reaching the capacity

Constructors

BackPressureStrategy

constructor(capacity: Int, onThresholdReached: () -> Unit, onItemDropped: (Any) -> Unit, backpressureMitigation: BackPressureMitigation)

Parameters
capacity the maximum size of the queue
onThresholdReached callback called when the queue reaches full capacity
onItemDropped called when an item is dropped because of this backpressure strategy
backpressureMitigation the mitigation to use when reaching the capacity

Properties

backpressureMitigation

val backpressureMitigation: BackPressureMitigation

Parameters
backpressureMitigation the mitigation to use when reaching the capacity

capacity

val capacity: Int

Parameters
capacity the maximum size of the queue

onItemDropped

val onItemDropped: (Any) -> Unit

Parameters
onItemDropped called when an item is dropped because of this backpressure strategy

onThresholdReached

val onThresholdReached: () -> Unit

Parameters
onThresholdReached callback called when the queue reaches full capacity
Clone this wiki locally