public class SpscOffHeapFixedSizeRingBuffer extends OffHeapFixedMessageSizeRingBuffer
| Modifier and Type | Field and Description |
|---|---|
static long |
EOF |
private int |
lookAheadStep |
private static java.lang.Integer |
MAX_LOOK_AHEAD_STEP |
private long |
producerLookAheadCacheAddress |
bufferAddress, consumerIndexAddress, HEADER_SIZE, mask, MESSAGE_INDICATOR_SIZE, messageSize, producerIndexAddress, READ_ACQUIRE_INDICATOR, READ_RELEASE_INDICATOR, referenceMessageSize, references, WRITE_ACQUIRE_INDICATOR, WRITE_RELEASE_INDICATOR| Modifier | Constructor and Description |
|---|---|
protected |
SpscOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff,
int capacity,
boolean isProducer,
boolean isConsumer,
boolean initialize,
int messageSize,
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.
|
|
SpscOffHeapFixedSizeRingBuffer(int capacity,
int messageSize,
int referenceMessageSize) |
| Modifier and Type | Method and Description |
|---|---|
static int |
getLookaheadStep(int capacity) |
private long |
lpLookAheadCache() |
protected long |
readAcquire()
Acquire an offset to read from
|
protected void |
readRelease(long offset)
Release the offset from reading
|
private void |
spLookAheadCache(long value) |
protected long |
writeAcquire()
Acquire an offset to write to.
|
protected void |
writeRelease(long offset) |
protected void |
writeRelease(long offset,
int type)
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, writeReleaseStateprivate static final java.lang.Integer MAX_LOOK_AHEAD_STEP
public static final long EOF
private final int lookAheadStep
private final long producerLookAheadCacheAddress
public SpscOffHeapFixedSizeRingBuffer(int capacity,
int messageSize,
int referenceMessageSize)
protected SpscOffHeapFixedSizeRingBuffer(java.nio.ByteBuffer buff,
int capacity,
boolean isProducer,
boolean isConsumer,
boolean initialize,
int messageSize,
java.lang.Object[] references,
int referenceMessageSize)
buff - capacity - in messages, actual capacity will bemessageSize - public static int getLookaheadStep(int capacity)
protected final long writeAcquire()
ProxyChannelRingBufferwriteAcquire 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 void writeRelease(long offset,
int type)
ProxyChannelRingBufferwriteRelease in class ProxyChannelRingBufferoffset - the offset that was released for writingtype - A unique ID for the callprotected final long readAcquire()
ProxyChannelRingBufferreadAcquire in class OffHeapFixedMessageSizeRingBufferprotected final void readRelease(long offset)
ProxyChannelRingBufferreadRelease in class OffHeapFixedMessageSizeRingBufferoffset - the base address of a message that we are done reading and can be overwritten nowprivate long lpLookAheadCache()
private void spLookAheadCache(long value)