public class CncFileDescriptor
extends java.lang.Object
File Layout
+-----------------------------+ | Meta Data | +-----------------------------+ | to-driver Buffer | +-----------------------------+ | to-clients Buffer | +-----------------------------+ | Counters Metadata Buffer | +-----------------------------+ | Counters Values Buffer | +-----------------------------+ | Error Log | +-----------------------------+
Meta Data Layout CNC_VERSION
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Aeron CnC Version | +---------------------------------------------------------------+ | to-driver buffer length | +---------------------------------------------------------------+ | to-clients buffer length | +---------------------------------------------------------------+ | Counters Metadata buffer length | +---------------------------------------------------------------+ | Counters Values buffer length | +---------------------------------------------------------------+ | Error Log buffer length | +---------------------------------------------------------------+ | Client Liveness Timeout | | | +---------------------------------------------------------------+ | Driver Start Timestamp | | | +---------------------------------------------------------------+ | Driver PID | | | +---------------------------------------------------------------+
Modifier and Type | Field and Description |
---|---|
static int |
CLIENT_LIVENESS_TIMEOUT_FIELD_OFFSET |
static java.lang.String |
CNC_FILE |
static int |
CNC_VERSION |
static int |
CNC_VERSION_FIELD_OFFSET |
static int |
COUNTERS_METADATA_BUFFER_LENGTH_FIELD_OFFSET |
static int |
COUNTERS_VALUES_BUFFER_LENGTH_FIELD_OFFSET |
static int |
END_OF_METADATA_OFFSET |
static int |
ERROR_LOG_BUFFER_LENGTH_FIELD_OFFSET |
static int |
META_DATA_LENGTH |
static int |
PID_FIELD_OFFSET |
static int |
START_TIMESTAMP_FIELD_OFFSET |
static int |
TO_CLIENTS_BUFFER_LENGTH_FIELD_OFFSET |
static int |
TO_DRIVER_BUFFER_LENGTH_FIELD_OFFSET |
Constructor and Description |
---|
CncFileDescriptor() |
Modifier and Type | Method and Description |
---|---|
static long |
clientLivenessTimeout(org.agrona.DirectBuffer metaDataBuffer) |
static int |
clientLivenessTimeoutOffset(int baseOffset) |
static int |
cncVersionOffset(int baseOffset) |
static int |
computeCncFileLength(int totalLengthOfBuffers,
int alignment)
Compute the length of the cnc file and return it.
|
static int |
countersMetaDataBufferLengthOffset(int baseOffset) |
static int |
countersValuesBufferLengthOffset(int baseOffset) |
static org.agrona.concurrent.UnsafeBuffer |
createCountersMetaDataBuffer(java.nio.ByteBuffer buffer,
org.agrona.DirectBuffer metaDataBuffer) |
static org.agrona.concurrent.UnsafeBuffer |
createCountersValuesBuffer(java.nio.ByteBuffer buffer,
org.agrona.DirectBuffer metaDataBuffer) |
static org.agrona.concurrent.UnsafeBuffer |
createErrorLogBuffer(java.nio.ByteBuffer buffer,
org.agrona.DirectBuffer metaDataBuffer) |
static org.agrona.concurrent.UnsafeBuffer |
createMetaDataBuffer(java.nio.ByteBuffer buffer) |
static org.agrona.concurrent.UnsafeBuffer |
createToClientsBuffer(java.nio.ByteBuffer buffer,
org.agrona.DirectBuffer metaDataBuffer) |
static org.agrona.concurrent.UnsafeBuffer |
createToDriverBuffer(java.nio.ByteBuffer buffer,
org.agrona.DirectBuffer metaDataBuffer) |
static int |
errorLogBufferLengthOffset(int baseOffset) |
static void |
fillMetaData(org.agrona.concurrent.UnsafeBuffer cncMetaDataBuffer,
int toDriverBufferLength,
int toClientsBufferLength,
int counterMetaDataBufferLength,
int counterValuesBufferLength,
long clientLivenessTimeout,
int errorLogBufferLength,
long startTimestamp,
long pid) |
static long |
pid(org.agrona.DirectBuffer metaDataBuffer) |
static int |
pidOffset(int baseOffset) |
static void |
signalCncReady(org.agrona.concurrent.UnsafeBuffer cncMetaDataBuffer) |
static long |
startTimestamp(org.agrona.DirectBuffer metaDataBuffer) |
static int |
startTimestampOffset(int baseOffset) |
static int |
toClientsBufferLengthOffset(int baseOffset) |
static int |
toDriverBufferLengthOffset(int baseOffset) |
public static final java.lang.String CNC_FILE
public static final int CNC_VERSION
public static final int CNC_VERSION_FIELD_OFFSET
public static final int TO_DRIVER_BUFFER_LENGTH_FIELD_OFFSET
public static final int TO_CLIENTS_BUFFER_LENGTH_FIELD_OFFSET
public static final int COUNTERS_METADATA_BUFFER_LENGTH_FIELD_OFFSET
public static final int COUNTERS_VALUES_BUFFER_LENGTH_FIELD_OFFSET
public static final int CLIENT_LIVENESS_TIMEOUT_FIELD_OFFSET
public static final int ERROR_LOG_BUFFER_LENGTH_FIELD_OFFSET
public static final int START_TIMESTAMP_FIELD_OFFSET
public static final int PID_FIELD_OFFSET
public static final int META_DATA_LENGTH
public static final int END_OF_METADATA_OFFSET
public static int computeCncFileLength(int totalLengthOfBuffers, int alignment)
totalLengthOfBuffers
- in bytesalignment
- for file length to adhere topublic static int cncVersionOffset(int baseOffset)
public static int toDriverBufferLengthOffset(int baseOffset)
public static int toClientsBufferLengthOffset(int baseOffset)
public static int countersMetaDataBufferLengthOffset(int baseOffset)
public static int countersValuesBufferLengthOffset(int baseOffset)
public static int clientLivenessTimeoutOffset(int baseOffset)
public static int errorLogBufferLengthOffset(int baseOffset)
public static int startTimestampOffset(int baseOffset)
public static int pidOffset(int baseOffset)
public static void fillMetaData(org.agrona.concurrent.UnsafeBuffer cncMetaDataBuffer, int toDriverBufferLength, int toClientsBufferLength, int counterMetaDataBufferLength, int counterValuesBufferLength, long clientLivenessTimeout, int errorLogBufferLength, long startTimestamp, long pid)
public static void signalCncReady(org.agrona.concurrent.UnsafeBuffer cncMetaDataBuffer)
public static org.agrona.concurrent.UnsafeBuffer createMetaDataBuffer(java.nio.ByteBuffer buffer)
public static org.agrona.concurrent.UnsafeBuffer createToDriverBuffer(java.nio.ByteBuffer buffer, org.agrona.DirectBuffer metaDataBuffer)
public static org.agrona.concurrent.UnsafeBuffer createToClientsBuffer(java.nio.ByteBuffer buffer, org.agrona.DirectBuffer metaDataBuffer)
public static org.agrona.concurrent.UnsafeBuffer createCountersMetaDataBuffer(java.nio.ByteBuffer buffer, org.agrona.DirectBuffer metaDataBuffer)
public static org.agrona.concurrent.UnsafeBuffer createCountersValuesBuffer(java.nio.ByteBuffer buffer, org.agrona.DirectBuffer metaDataBuffer)
public static org.agrona.concurrent.UnsafeBuffer createErrorLogBuffer(java.nio.ByteBuffer buffer, org.agrona.DirectBuffer metaDataBuffer)
public static long clientLivenessTimeout(org.agrona.DirectBuffer metaDataBuffer)
public static long startTimestamp(org.agrona.DirectBuffer metaDataBuffer)
public static long pid(org.agrona.DirectBuffer metaDataBuffer)
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.