Class BoundedBuffer<E>
java.lang.Object
com.github.benmanes.caffeine.cache.StripedBuffer<E>
com.github.benmanes.caffeine.cache.BoundedBuffer<E>
- Type Parameters:
E- the type of elements maintained by this buffer
- All Implemented Interfaces:
Buffer<E>
A striped, non-blocking, bounded buffer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intThe maximum number of elements per buffer.(package private) static final intFields inherited from class StripedBuffer
ATTEMPTS, MAXIMUM_TABLE_SIZE, NCPU, PROBE, table, TABLE_BUSY, tableBusy -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class StripedBuffer
advanceProbe, casTableBusy, drainTo, expandOrRetry, getProbe, offer, reads, writes
-
Field Details
-
BUFFER_SIZE
static final int BUFFER_SIZEThe maximum number of elements per buffer.- See Also:
-
MASK
static final int MASK- See Also:
-
-
Constructor Details
-
BoundedBuffer
BoundedBuffer()
-
-
Method Details
-
create
Description copied from class:StripedBufferCreates a new buffer instance after resizing to accommodate a producer.- Specified by:
createin classStripedBuffer<E>- Parameters:
e- the producer's element- Returns:
- a newly created buffer populated with a single element
-