
| Constructor and Description |
|---|
BoundedBuffer() |
| Modifier and Type | Method and Description |
|---|---|
protected Buffer<E> |
create(E e)
Creates a new buffer instance after resizing to accommodate a producer.
|
void |
drainTo(Consumer<E> consumer)
Drains the buffer, sending each element to the consumer for processing.
|
int |
offer(E e)
Inserts the specified element into this buffer if it is possible to do so immediately without
violating capacity restrictions.
|
int |
reads()
Returns the number of elements that have been read from the buffer.
|
int |
writes()
Returns the number of elements that have been written to the buffer.
|
protected Buffer<E> create(E e)
e - the producer's elementpublic int offer(E e)
Bufferpublic void drainTo(Consumer<E> consumer)
Bufferpublic int reads()
BufferCopyright © 2009–2025 OrientDB. All rights reserved.