BackPressureStrategy - DataDog/dd-sdk-android GitHub Wiki

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