Package org.apache.pekko.stream
Class DelayOverflowStrategy
java.lang.Object
org.apache.pekko.stream.DelayOverflowStrategy
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OverflowStrategies.EmitEarly$,OverflowStrategy
Represents a strategy that decides how to deal with a buffer of time based operator
that is full but is about to receive a new element.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DelayOverflowStrategyIf the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer.static DelayOverflowStrategyIf the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element.static DelayOverflowStrategydropHead()If the buffer is full when a new element arrives, drops the oldest element from the buffer to make space for the new element.static DelayOverflowStrategydropTail()If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element.static DelayOverflowStrategyIf the buffer is full when a new element is available this strategy send next element downstream without waiting Will backpressure if downstream is not ready.static DelayOverflowStrategyfail()If the buffer is full when a new element is available this strategy completes the stream with failure.
-
Constructor Details
-
DelayOverflowStrategy
public DelayOverflowStrategy()
-
-
Method Details
-
emitEarly
If the buffer is full when a new element is available this strategy send next element downstream without waiting Will backpressure if downstream is not ready. -
dropHead
If the buffer is full when a new element arrives, drops the oldest element from the buffer to make space for the new element. -
dropTail
If the buffer is full when a new element arrives, drops the youngest element from the buffer to make space for the new element. -
dropBuffer
If the buffer is full when a new element arrives, drops all the buffered elements to make space for the new element. -
backpressure
If the buffer is full when a new element is available this strategy backpressures the upstream publisher until space becomes available in the buffer. -
fail
If the buffer is full when a new element is available this strategy completes the stream with failure.
-