Add a value into the buffer if there is space or it has a higher priority than the lowest priority item currently in the buffer. If it has the same priority as the lowest priority item, then the previous value will be retained and the new value will be rejected.
Add a value into the buffer if there is space or it has a higher priority than the lowest priority item currently in the buffer. If it has the same priority as the lowest priority item, then the previous value will be retained and the new value will be rejected.
Value parameters
value
Value to attempt to add into the buffer.
Attributes
Returns
The return value is either: a) a value that was ejected because of the new addition, b) the value that was passed in if it wasn't high enough priority, or c) null if the max size has not yet been reached.