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 Class<MultiReaderBytesRingBuffer> |
clazz() |
void |
clear()
clears the ring buffer but moving the read position to the write position
|
boolean |
isEmpty() |
static BytesRingBuffer |
newInstance(NativeBytesStore<Void> bytesStore) |
static MultiReaderBytesRingBuffer |
newInstance(NativeBytesStore<Void> bytesStore,
int numReaders) |
boolean |
offer(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(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, maxCopyTimeNs, minNumberOfWriteBytesRemaining, readers@NotNull static BytesRingBuffer newInstance(@NotNull NativeBytesStore<Void> bytesStore)
@NotNull static MultiReaderBytesRingBuffer newInstance(@NotNull NativeBytesStore<Void> bytesStore, int numReaders)
@NotNull static Class<MultiReaderBytesRingBuffer> clazz() throws ClassNotFoundException
ClassNotFoundExceptionstatic long sizeFor(long capacity)
static long sizeFor(long capacity,
int numReaders)
void clear()
boolean offer(@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
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()
Copyright © 2019. All rights reserved.