public class HeaderFlyweight extends UnsafeBuffer
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Frame Length | +---------------------------------------------------------------+ | Version | Flags | Type | +-------------+---------------+---------------------------------+ | Depends on Type ...
| Modifier and Type | Field and Description |
|---|---|
static byte |
CURRENT_VERSION
default version
|
static int |
FLAGS_FIELD_OFFSET
Offset in the frame at which the flags field begins.
|
static int |
FRAME_LENGTH_FIELD_OFFSET
Offset in the frame at which the frame length field begins.
|
static int |
HDR_TYPE_DATA
header type DATA
|
static int |
HDR_TYPE_ERR
header type ERR
|
static int |
HDR_TYPE_EXT
header type EXT
|
static int |
HDR_TYPE_NAK
header type NAK
|
static int |
HDR_TYPE_PAD
header type PAD
|
static int |
HDR_TYPE_RES
header type RESOLUTION
|
static int |
HDR_TYPE_RTTM
header type RTT Measurement
|
static int |
HDR_TYPE_SETUP
header type SETUP
|
static int |
HDR_TYPE_SM
header type SM
|
static int |
MIN_HEADER_LENGTH
Minimum length of any Aeron frame.
|
static int |
TYPE_FIELD_OFFSET
Offset in the frame at which the frame type field begins.
|
static int |
VERSION_FIELD_OFFSET
Offset in the frame at which the version field begins.
|
ALIGNMENT, DISABLE_BOUNDS_CHECKS_PROP_NAME, SHOULD_BOUNDS_CHECKDISABLE_ARRAY_CONTENT_PRINTOUT_PROP_NAME, STR_HEADER_LEN| Constructor and Description |
|---|
HeaderFlyweight()
Default constructor which can later be use to wrap a frame.
|
HeaderFlyweight(ByteBuffer buffer)
Construct a flyweight which wraps a
ByteBuffer over the frame. |
HeaderFlyweight(UnsafeBuffer buffer)
Construct a flyweight which wraps a
UnsafeBuffer over the frame. |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendFlagsAsChars(short flags,
Appendable appendable)
Append header flags to an
Appendable to be human readable. |
short |
flags()
The flags field value.
|
HeaderFlyweight |
flags(short flags)
Set the flags field value.
|
static char[] |
flagsToChars(short flags)
Convert header flags to an array of chars to be human readable.
|
int |
frameLength()
The length of the frame field value.
|
HeaderFlyweight |
frameLength(int length)
Set the length of the frame field value.
|
int |
headerType()
The type field value.
|
HeaderFlyweight |
headerType(int type)
Set the type field value.
|
short |
version()
The version field value.
|
HeaderFlyweight |
version(short version)
Set the version field value.
|
addIntOrdered, addLongOrdered, addressOffset, boundsCheck, byteArray, byteBuffer, capacity, checkLimit, compareAndSetInt, compareAndSetLong, compareTo, equals, getAndAddInt, getAndAddLong, getAndSetInt, getAndSetLong, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getByteVolatile, getChar, getChar, getCharVolatile, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntVolatile, getLong, getLong, getLongVolatile, getShort, getShort, getShortVolatile, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, hashCode, isExpandable, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAscii, putByte, putBytes, putBytes, putBytes, putBytes, putBytes, putByteVolatile, putChar, putChar, putCharVolatile, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putIntAscii, putIntOrdered, putIntVolatile, putLong, putLong, putLongAscii, putLongOrdered, putLongVolatile, putNaturalIntAscii, putNaturalIntAsciiFromEnd, putNaturalLongAscii, putNaturalPaddedIntAscii, putShort, putShort, putShortVolatile, putStringAscii, putStringAscii, putStringUtf8, putStringUtf8, putStringUtf8, putStringUtf8, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthUtf8, setMemory, toString, verifyAlignment, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapAdjustmentpublic static final int HDR_TYPE_PAD
public static final int HDR_TYPE_DATA
public static final int HDR_TYPE_NAK
public static final int HDR_TYPE_SM
public static final int HDR_TYPE_ERR
public static final int HDR_TYPE_SETUP
public static final int HDR_TYPE_RTTM
public static final int HDR_TYPE_RES
public static final int HDR_TYPE_EXT
public static final byte CURRENT_VERSION
public static final int FRAME_LENGTH_FIELD_OFFSET
public static final int VERSION_FIELD_OFFSET
public static final int FLAGS_FIELD_OFFSET
public static final int TYPE_FIELD_OFFSET
public static final int MIN_HEADER_LENGTH
public HeaderFlyweight()
public HeaderFlyweight(UnsafeBuffer buffer)
UnsafeBuffer over the frame.buffer - to wrap for the flyweight.public HeaderFlyweight(ByteBuffer buffer)
ByteBuffer over the frame.buffer - to wrap for the flyweight.public short version()
public HeaderFlyweight version(short version)
version - field value to be set.public short flags()
public HeaderFlyweight flags(short flags)
flags - field value.public int headerType()
public HeaderFlyweight headerType(int type)
type - field value.public int frameLength()
public HeaderFlyweight frameLength(int length)
length - field value.public static char[] flagsToChars(short flags)
flags - to be converted.public static void appendFlagsAsChars(short flags,
Appendable appendable)
Appendable to be human readable.flags - to be converted.appendable - to append flags to.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.