The buffer stores temporary, which is implicitly discarded, and permanent data, which are explicitly discarded.
Data is always delivered in the order they are buffered. The temporary data is stored in a queue. Permanent data is stored in a wheel for performance and to avoid discards.estimate_size/1 | Returns the estimate size of the buffer data. |
new/1 | Builds a new buffer. |
store_permanent_unless_empty/2 | Puts the permanent entry in the buffer unless the buffer is empty. |
store_temporary/3 | Stores the temporary entries. |
take_count_or_until_permanent/2 | Take count temporary from the buffer or until we find a permanent. |
estimate_size(X1) -> any()
Returns the estimate size of the buffer data.
It does not count data on the wheel.new(Size) -> any()
Builds a new buffer.
store_permanent_unless_empty(Buffer, Perm) -> any()
Puts the permanent entry in the buffer unless the buffer is empty.
store_temporary(X1, Temps, Keep) -> any()
Stores the temporary entries.
keep controls which side to keep, first or last.
It returns a new buffer, the amount of discarded messages and any permanent entry that had to be emitted while discarding.take_count_or_until_permanent(X1, Counter) -> any()
Take count temporary from the buffer or until we find a permanent.
Return empty if nothing was taken.Generated by EDoc