public interface RingBufferReader extends RingBufferReaderStats, Closeable
| Modifier and Type | Field and Description |
|---|---|
static long |
UNKNOWN_INDEX |
| Modifier and Type | Method and Description |
|---|---|
void |
afterRead(long next) |
void |
afterRead(long next,
long payloadStart,
long underlyingIndex) |
long |
beforeRead(Bytes bytes)
the readPosition and readLimit will be adjusted so that the client can read the data
|
BytesStore |
byteStore() |
void |
close()
Close the reader.
|
boolean |
isClosed() |
boolean |
isEmpty() |
boolean |
read(BytesOut bytes)
Convenience method calls both
beforeRead(Bytes) and afterRead(long) |
void |
toEnd()
Take reader to just past the end of the RB
|
long |
underlyingIndex() |
behind, getAndClearMissedReadCount, getAndClearReadCountstatic final long UNKNOWN_INDEX
boolean isEmpty()
boolean isClosed()
void close()
close in interface AutoCloseableclose in interface Closeablelong beforeRead(Bytes bytes)
bytes - who's byteStore must be the ring buffer,afterRead(long)void afterRead(long next)
void afterRead(long next,
long payloadStart,
long underlyingIndex)
long underlyingIndex()
boolean read(BytesOut bytes)
beforeRead(Bytes) and afterRead(long)bytes - BytesStore byteStore()
void toEnd()
Copyright © 2020. All rights reserved.