- Source:
A buffer implementation that drops newly added items when the buffer is full.
This dropping behavior is silent: the new item is simply not added to the queue. Note that this buffer is never
full
because it can always be added to wiehtout exceeding the size, even if that 'adding' doesn't result in a new
item actually appearing in the buffer.
Extends
Members
(readonly) full :number
- Source:
Whether or not the buffer is full. As a DroppingBuffer is
never considered full, this will always return false
.
Type:
- number
Methods
add(…items)
- Source:
Adds one or more items to the buffer. If the buffer has already reached its capacity, then the item is silently dropped instead.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
items |
* |
<repeatable> |
the items added to the buffer. |