The number of elements to wait for an out-of-order element.
The id of the first element getting to the BoundedOrdering.
Function to calculate the subsequent id from the current id.
Function to get the id from an element.
Defines how the element ids are being ordered.
Defines how the element ids are being ordered.
Orders the stream within a sliding window of maxBounded elements. Each element passing through the BoundedOrdering has an id. The elements can be ordered by the ordering function and the next expected id can be derived from the current id.
It takes an element and emits downstream if the getId(elem) matches the currently stored id, if not enqueues to a priority queue. When an element is emitted, the stored id is updated by calling nextId to match the next expected element and an element is dequeued from the priority queue and emitted if it matches the updated id. If the out-of-order element arrives at a later point than maxBounded then it is emitted straight downstream.
The input and output type of this stream component.
The type of the element's id. Emits when getId(elem) matches the current state, if not enqueues it to priority queue Backpressures when downstream backpressures Completes when upstream completes Cancels when downstream cancels