public class LogBufferDescriptor extends Object
+----------------------------+ | Partition 0 | +----------------------------+ | Partition 1 | +----------------------------+ | Partition 2 | +----------------------------+ | Partition Meta Data 0 | +----------------------------+ | Partition Meta Data 1 | +----------------------------+ | Partition Meta Data 2 | +----------------------------+ | Log Meta Data | +----------------------------+
| Modifier and Type | Field and Description |
|---|---|
static int |
LOG_ACTIVE_PARTITION_ID_OFFSET
Offset within the log meta data where the active Partition id is stored.
|
static int |
LOG_INITIAL_PARTITION_ID_OFFSET
Offset within the log meta data where the active Partition id is stored.
|
static int |
LOG_MAX_FRAME_LENGTH_OFFSET
Offset within the log meta data which the MTU length is stored;
|
static int |
LOG_META_DATA_LENGTH
Total length of the log meta data buffer in bytes.
|
static int |
LOG_PUBLISHER_LIMIT_OFFSET
Offset within the log meta data where the current publisher limit is stored.
|
static int |
PARTITION_CLEAN
A Partition which is clean or in use.
|
static int |
PARTITION_COUNT
The number of Partitions the log is divided into
|
static int |
PARTITION_META_DATA_LENGTH
Total length of the Partition meta data buffer in bytes.
|
static int |
PARTITION_MIN_LENGTH
Minimum buffer length for a Partition
|
static int |
PARTITION_NEEDS_CLEANING
A Partition is dirty and requires cleaning.
|
static int |
PARTITION_STATUS_OFFSET
Offset within the Partition meta data where current status is stored
|
static int |
PARTITION_TAIL_COUNTER_OFFSET
Offset within the Partition meta data where the tail value is stored.
|
| Constructor and Description |
|---|
LogBufferDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
static int |
logMetadataOffset(int partitionSize) |
static int |
partitionDataSectionOffset(int partitionSize,
int partitionNumber) |
static int |
partitionMetadataSectionOffset(int partitionSize,
int partitionNumber) |
static int |
requiredCapacity(int partitionSize)
Calculates the required capacity for a log buffer which can hold up to the provided bytes of
data.
|
public static final int PARTITION_COUNT
public static final int PARTITION_MIN_LENGTH
public static final int PARTITION_CLEAN
public static final int PARTITION_NEEDS_CLEANING
public static final int PARTITION_TAIL_COUNTER_OFFSET
public static final int PARTITION_STATUS_OFFSET
public static final int PARTITION_META_DATA_LENGTH
public static final int LOG_PUBLISHER_LIMIT_OFFSET
public static final int LOG_ACTIVE_PARTITION_ID_OFFSET
public static final int LOG_INITIAL_PARTITION_ID_OFFSET
public static final int LOG_MAX_FRAME_LENGTH_OFFSET
public static final int LOG_META_DATA_LENGTH
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Publisher limit | | | +---------------------------------------------------------------+ | Cache Line Padding ... ... | +---------------------------------------------------------------+ | Active Partition Id | +---------------------------------------------------------------+ | Cache Line Padding ... ... | +---------------------------------------------------------------+ | Initial Partition Id | +---------------------------------------------------------------+ | Max Frame Length | +---------------------------------------------------------------+
public static int requiredCapacity(int partitionSize)
public static int partitionMetadataSectionOffset(int partitionSize,
int partitionNumber)
public static int partitionDataSectionOffset(int partitionSize,
int partitionNumber)
public static int logMetadataOffset(int partitionSize)
Copyright © 2017–2018 camunda services GmbH. All rights reserved.