public final class MpscFFLamportOffHeapFixedSizeRingBuffer extends OffHeapFixedMessageSizeRingBuffer
Modifier and Type | Field and Description |
---|---|
private long |
consumerIndexCacheAddress |
bufferAddress, consumerIndexAddress, HEADER_SIZE, mask, MESSAGE_INDICATOR_SIZE, messageSize, producerIndexAddress, READ_ACQUIRE_INDICATOR, READ_RELEASE_INDICATOR, referenceMessageSize, references, WRITE_ACQUIRE_INDICATOR, WRITE_RELEASE_INDICATOR
EOF
Modifier | Constructor and Description |
---|---|
protected |
MpscFFLamportOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff,
int capacity,
boolean isProducer,
boolean isConsumer,
boolean initialize,
int primitiveMessageSize,
java.lang.Object[] references,
int referenceMessageSize)
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.
|
|
MpscFFLamportOffHeapFixedSizeRingBuffer(int capacity,
int primitiveMessageSize,
int referenceMessageSize) |
Modifier and Type | Method and Description |
---|---|
private boolean |
casProducerIndex(long expected,
long update) |
private long |
lpConsumerIndexCache() |
protected long |
readAcquire()
Acquire an offset to read from
|
protected void |
readRelease(long offset)
Release the offset from reading
|
private long |
slowPathWriteAcquire(long wrapPoint) |
private void |
spConsumerIndexCache(long value) |
private static void |
spReadReleaseState(long offset) |
protected long |
writeAcquire()
Acquire an offset to write to.
|
protected void |
writeRelease(long offset) |
protected void |
writeRelease(long offset,
int callTypeId)
Ordered store of the callTypeId for the message at offset
|
arrayIndexForCursor, arrayIndexForCursor, capacity, consumerReferenceArrayIndex, createReferenceArray, getRequiredArraySize, getRequiredBufferSize, isEmpty, isReadReleased, lpConsumerIndex, lpProducerIndex, lvConsumerIndex, lvProducerIndex, offsetForIndex, offsetForIndex, producerReferenceArrayIndex, readAcquireState, readReference, readReleaseState, relativeIndexForOffset, relativeIndexForOffset, size, soConsumerIndex, soProducerIndex, writeAcquireState, writeReference, writeReleaseState
public MpscFFLamportOffHeapFixedSizeRingBuffer(int capacity, int primitiveMessageSize, int referenceMessageSize)
protected MpscFFLamportOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff, int capacity, boolean isProducer, boolean isConsumer, boolean initialize, int primitiveMessageSize, java.lang.Object[] references, int referenceMessageSize)
buff
- capacity
- private long slowPathWriteAcquire(long wrapPoint)
protected final long writeAcquire()
ProxyChannelRingBuffer
writeAcquire
in class OffHeapFixedMessageSizeRingBuffer
protected final void writeRelease(long offset)
writeRelease
in class OffHeapFixedMessageSizeRingBuffer
offset
- the base address of a message that we are done writing and can be read nowprotected final void writeRelease(long offset, int callTypeId)
ProxyChannelRingBuffer
writeRelease
in class ProxyChannelRingBuffer
offset
- the offset that was released for writingcallTypeId
- A unique ID for the callprotected final long readAcquire()
ProxyChannelRingBuffer
readAcquire
in class OffHeapFixedMessageSizeRingBuffer
protected final void readRelease(long offset)
ProxyChannelRingBuffer
readRelease
in class OffHeapFixedMessageSizeRingBuffer
offset
- the base address of a message that we are done reading and can be overwritten nowprivate boolean casProducerIndex(long expected, long update)
private long lpConsumerIndexCache()
private void spConsumerIndexCache(long value)
private static void spReadReleaseState(long offset)