public class DataHeaderFlyweight extends HeaderFlyweight
Data Frame wiki page.
Modifier and Type | Field and Description |
---|---|
static short |
BEGIN_AND_END_FLAGS
Begin and End Flags
|
static short |
BEGIN_END_AND_EOS_FLAGS
Begin, End, and End of Stream Flags
|
static short |
BEGIN_FLAG
Begin Flag
|
static int |
DATA_OFFSET |
static long |
DEFAULT_RESERVE_VALUE |
static short |
END_FLAG
End Flag
|
static short |
EOS_FLAG
End of Stream Flag
|
static int |
HEADER_LENGTH
Length of the Data Header
|
static int |
RESERVED_VALUE_OFFSET |
static int |
SESSION_ID_FIELD_OFFSET |
static int |
STREAM_ID_FIELD_OFFSET |
static int |
TERM_ID_FIELD_OFFSET |
static int |
TERM_OFFSET_FIELD_OFFSET |
CURRENT_VERSION, FLAGS_FIELD_OFFSET, FRAME_LENGTH_FIELD_OFFSET, HDR_TYPE_DATA, HDR_TYPE_ERR, HDR_TYPE_EXT, HDR_TYPE_NAK, HDR_TYPE_PAD, HDR_TYPE_RTTM, HDR_TYPE_SETUP, HDR_TYPE_SM, MIN_HEADER_LENGTH, TYPE_FIELD_OFFSET, VERSION_FIELD_OFFSET
Constructor and Description |
---|
DataHeaderFlyweight() |
DataHeaderFlyweight(java.nio.ByteBuffer buffer) |
DataHeaderFlyweight(org.agrona.concurrent.UnsafeBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
static org.agrona.concurrent.UnsafeBuffer |
createDefaultHeader(int sessionId,
int streamId,
int termId)
Return an initialised default Data Frame Header.
|
int |
dataOffset()
Return offset in buffer for data
|
static boolean |
isEndOfStream(org.agrona.concurrent.UnsafeBuffer packet)
Does the data frame in the packet have the EOS flag set?
|
static boolean |
isHeartbeat(org.agrona.concurrent.UnsafeBuffer packet,
int length)
Is the frame at data frame at the beginning of packet a heartbeat message?
|
long |
reservedValue()
Get the reserved value in LITTLE_ENDIAN format.
|
DataHeaderFlyweight |
reservedValue(long reservedValue)
Set the reserved value in LITTLE_ENDIAN format.
|
int |
sessionId()
return session id field
|
DataHeaderFlyweight |
sessionId(int sessionId)
set session id field
|
static int |
sessionId(org.agrona.concurrent.UnsafeBuffer termBuffer,
int frameOffset) |
int |
streamId()
return stream id field
|
DataHeaderFlyweight |
streamId(int streamId)
set stream id field
|
static int |
streamId(org.agrona.concurrent.UnsafeBuffer termBuffer,
int frameOffset) |
int |
termId()
return term id field
|
DataHeaderFlyweight |
termId(int termId)
set term id field
|
static int |
termId(org.agrona.concurrent.UnsafeBuffer termBuffer,
int frameOffset) |
int |
termOffset()
return term offset field
|
DataHeaderFlyweight |
termOffset(int termOffset)
set term offset field
|
static int |
termOffset(org.agrona.concurrent.UnsafeBuffer termBuffer,
int frameOffset) |
java.lang.String |
toString() |
flags, flags, frameLength, frameLength, headerType, headerType, version, version
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, getStringUtf8, getStringUtf8, getStringUtf8, 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, verifyAlignment, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapAdjustment
public static final int HEADER_LENGTH
public static final short BEGIN_FLAG
public static final short END_FLAG
public static final short BEGIN_AND_END_FLAGS
public static final short EOS_FLAG
public static final short BEGIN_END_AND_EOS_FLAGS
public static final long DEFAULT_RESERVE_VALUE
public static final int TERM_OFFSET_FIELD_OFFSET
public static final int SESSION_ID_FIELD_OFFSET
public static final int STREAM_ID_FIELD_OFFSET
public static final int TERM_ID_FIELD_OFFSET
public static final int RESERVED_VALUE_OFFSET
public static final int DATA_OFFSET
public DataHeaderFlyweight()
public DataHeaderFlyweight(org.agrona.concurrent.UnsafeBuffer buffer)
public DataHeaderFlyweight(java.nio.ByteBuffer buffer)
public static boolean isHeartbeat(org.agrona.concurrent.UnsafeBuffer packet, int length)
packet
- containing the data frame.length
- of the data frame.public static boolean isEndOfStream(org.agrona.concurrent.UnsafeBuffer packet)
packet
- containing the data frame.public int sessionId()
public static int sessionId(org.agrona.concurrent.UnsafeBuffer termBuffer, int frameOffset)
public DataHeaderFlyweight sessionId(int sessionId)
sessionId
- field valuepublic int streamId()
public static int streamId(org.agrona.concurrent.UnsafeBuffer termBuffer, int frameOffset)
public DataHeaderFlyweight streamId(int streamId)
streamId
- field valuepublic int termId()
public static int termId(org.agrona.concurrent.UnsafeBuffer termBuffer, int frameOffset)
public DataHeaderFlyweight termId(int termId)
termId
- field valuepublic int termOffset()
public static int termOffset(org.agrona.concurrent.UnsafeBuffer termBuffer, int frameOffset)
public DataHeaderFlyweight termOffset(int termOffset)
termOffset
- field valuepublic long reservedValue()
public DataHeaderFlyweight reservedValue(long reservedValue)
reservedValue
- to be storedpublic int dataOffset()
public static org.agrona.concurrent.UnsafeBuffer createDefaultHeader(int sessionId, int streamId, int termId)
sessionId
- for the headerstreamId
- for the headertermId
- for the headerpublic java.lang.String toString()
toString
in class org.agrona.concurrent.UnsafeBuffer
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.