E - the type of elements maintained by this buffer
All Implemented Interfaces:
public final class
A striped, non-blocking, bounded buffer.
[email protected] (Ben Manes)
Fields inherited from interface com.orientechnologies.orient.core.storage.cache.chm.readbuffer.
Buffer FAILED, FULL, SUCCESS
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
( create E e)
Creates a new buffer instance after resizing to accommodate a producer.
( drainTo Consumer<E> consumer)
Drains the buffer, sending each element to the consumer for processing.
(E e) offer
Inserts the specified element into this buffer if it is possible to do so immediately without
violating capacity restrictions.
Returns the number of elements that have been read from the buffer.
Returns the number of elements that have been written to the buffer.
Methods inherited from class java.lang.
Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.orientechnologies.orient.core.storage.cache.chm.readbuffer.
public void drainTo(
Description copied from interface: Buffer
Drains the buffer, sending each element to the consumer for processing. The caller must ensure
that a consumer has exclusive read access to the buffer.
consumer - the action to perform on each element
Copyright © 2009–2020 OrientDB. All rights reserved.