public class MpscOffHeapFixedSizeRingBuffer extends OffHeapFixedMessageSizeRingBuffer
bufferAddress, consumerIndexAddress, EOF, HEADER_SIZE, mask, MESSAGE_INDICATOR_SIZE, messageSize, producerIndexAddress, READ_ACQUIRE_INDICATOR, READ_RELEASE_INDICATOR, WRITE_ACQUIRE_INDICATOR, WRITE_RELEASE_INDICATOR| Modifier | Constructor and Description |
|---|---|
protected |
MpscOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff,
int capacity,
boolean isProducer,
boolean isConsumer,
boolean initialize,
int messageSize)
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.
|
|
MpscOffHeapFixedSizeRingBuffer(int capacity,
int messageSize) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
casProducerIndex(long expected,
long update) |
protected long |
readAcquire() |
protected void |
readRelease(long offset) |
protected long |
writeAcquire() |
protected void |
writeRelease(long offset) |
capacity, getRequiredBufferSize, isEmpty, isReadReleased, lpConsumerIndex, lpProducerIndex, lvConsumerIndex, lvProducerIndex, offsetForIndex, offsetForIndex, readAcquireState, readReleaseState, size, soConsumerIndex, soProducerIndex, writeAcquireState, writeReleaseStatepublic MpscOffHeapFixedSizeRingBuffer(int capacity,
int messageSize)
protected MpscOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff,
int capacity,
boolean isProducer,
boolean isConsumer,
boolean initialize,
int messageSize)
buff - capacity - protected final long writeAcquire()
writeAcquire in class OffHeapFixedMessageSizeRingBufferprotected final void writeRelease(long offset)
writeRelease in class OffHeapFixedMessageSizeRingBufferoffset - the base address of a message that we are done writing and can be read nowprotected final long readAcquire()
readAcquire in class OffHeapFixedMessageSizeRingBufferprotected final void readRelease(long offset)
readRelease in class OffHeapFixedMessageSizeRingBufferoffset - the base address of a message that we are done reading and can be overwritten nowprivate boolean casProducerIndex(long expected,
long update)