public class RingBufferDescriptor
extends java.lang.Object
RingBuffer
. The buffer consists
of a ring of messages which is a power of 2 in size, followed by a trailer section containing state
information for the producers and consumers of the ring.Modifier and Type | Field and Description |
---|---|
static int |
CONSUMER_HEARTBEAT_OFFSET
Offset within the trailer for where the consumer heartbeat time value is stored.
|
static int |
CORRELATION_COUNTER_OFFSET
Offset within the trailer for where the correlation counter value is stored.
|
static int |
HEAD_CACHE_POSITION_OFFSET
Offset within the trailer for where the head cache value is stored.
|
static int |
HEAD_POSITION_OFFSET
Offset within the trailer for where the head value is stored.
|
static int |
TAIL_POSITION_OFFSET
Offset within the trailer for where the tail value is stored.
|
static int |
TRAILER_LENGTH
Total length of the trailer in bytes.
|
Constructor and Description |
---|
RingBufferDescriptor() |
Modifier and Type | Method and Description |
---|---|
static void |
checkCapacity(int capacity)
Check the the buffer capacity is the correct size (a power of 2 +
TRAILER_LENGTH ). |
public static final int TAIL_POSITION_OFFSET
public static final int HEAD_CACHE_POSITION_OFFSET
public static final int HEAD_POSITION_OFFSET
public static final int CORRELATION_COUNTER_OFFSET
public static final int CONSUMER_HEARTBEAT_OFFSET
public static final int TRAILER_LENGTH
public static void checkCapacity(int capacity)
TRAILER_LENGTH
).capacity
- to be checked.java.lang.IllegalStateException
- if the buffer capacity is incorrect.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.