public interface BytesRingBuffer extends BytesRingBufferStats, BytesConsumer, net.openhft.chronicle.core.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method and Description |
|---|---|
BytesStore |
bytesStore() |
static @NotNull Class<MultiReaderBytesRingBuffer> |
clazz() |
void |
clear()
clears the ring buffer but moving the read position to the write position
|
void |
close() |
boolean |
isEmpty() |
static @NotNull BytesRingBuffer |
newInstance(@NotNull NativeBytesStore<Void> bytesStore) |
static @NotNull MultiReaderBytesRingBuffer |
newInstance(@NotNull NativeBytesStore<Void> bytesStore,
int numReaders) |
boolean |
offer(@NotNull BytesStore bytes0)
Inserts the specified element at the tail of this queue if it is possible to do so
immediately without exceeding the queue's capacity,
|
boolean |
read(@NotNull BytesOut using)
Retrieves and removes the head of this queue, or returns
null if this queue is
empty. |
long |
readRemaining() |
static long |
sizeFor(long capacity) |
static long |
sizeFor(long capacity,
int numReaders) |
capacity, getAndClearContentionCount, getAndClearMissedWriteCount, getAndClearWriteCount, minNumberOfWriteBytesRemaining, readers@NotNull static @NotNull BytesRingBuffer newInstance(@NotNull @NotNull NativeBytesStore<Void> bytesStore)
@NotNull static @NotNull MultiReaderBytesRingBuffer newInstance(@NotNull @NotNull NativeBytesStore<Void> bytesStore, int numReaders)
@NotNull static @NotNull Class<MultiReaderBytesRingBuffer> clazz() throws ClassNotFoundException
ClassNotFoundExceptionstatic long sizeFor(long capacity)
static long sizeFor(long capacity,
int numReaders)
void clear()
boolean offer(@NotNull
@NotNull BytesStore bytes0)
bytes0 - the bytes0 that you wish to add to the ring buffertrue upon success and false if this queue is full.boolean read(@NotNull
@NotNull BytesOut using)
null if this queue is
empty.read in interface BytesConsumerusing - Bytes to read into.BufferOverflowException - is the using buffer is not large enoughlong readRemaining()
boolean isEmpty()
BytesStore bytesStore()
void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2020. All rights reserved.