Package io.aeron.protocol
Class RttMeasurementFlyweight
java.lang.Object
org.agrona.AbstractMutableDirectBuffer
org.agrona.concurrent.UnsafeBuffer
io.aeron.protocol.HeaderFlyweight
io.aeron.protocol.RttMeasurementFlyweight
- All Implemented Interfaces:
Comparable<DirectBuffer>,AtomicBuffer,DirectBuffer,MutableDirectBuffer
Flyweight for an RTT Measurement Frame Header.
RTT Measurement Frame Header wiki page.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLength of the header of the frame.static final shortFlag set to indicate this is a reply message.Fields inherited from class io.aeron.protocol.HeaderFlyweight
CURRENT_VERSION, FLAGS_FIELD_OFFSET, FRAME_LENGTH_FIELD_OFFSET, HDR_TYPE_ATS_DATA, HDR_TYPE_ATS_SETUP, HDR_TYPE_ATS_SM, HDR_TYPE_DATA, HDR_TYPE_ERR, HDR_TYPE_EXT, HDR_TYPE_NAK, HDR_TYPE_PAD, HDR_TYPE_RES, HDR_TYPE_RSP_SETUP, HDR_TYPE_RTTM, HDR_TYPE_SETUP, HDR_TYPE_SM, MIN_HEADER_LENGTH, TYPE_FIELD_OFFSET, VERSION_FIELD_OFFSETFields inherited from class org.agrona.concurrent.UnsafeBuffer
ALIGNMENT, DISABLE_BOUNDS_CHECKS_PROP_NAME, SHOULD_BOUNDS_CHECKFields inherited from class org.agrona.AbstractMutableDirectBuffer
addressOffset, byteArray, capacityFields inherited from interface org.agrona.concurrent.AtomicBuffer
STRICT_ALIGNMENT_CHECKS, STRICT_ALIGNMENT_CHECKS_PROP_NAMEFields inherited from interface org.agrona.DirectBuffer
DISABLE_ARRAY_CONTENT_PRINTOUT_PROP_NAME, STR_HEADER_LEN -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor which can later be used to wrap a frame.RttMeasurementFlyweight(ByteBuffer buffer) Construct the flyweight over a frame.RttMeasurementFlyweight(UnsafeBuffer buffer) Construct the flyweight over a frame. -
Method Summary
Modifier and TypeMethodDescriptionlongTimestamp to echo in a reply or the timestamp in the original RTT Measurement.echoTimestampNs(long timestampNs) Set timestamp to echo in a reply or the timestamp in the original RTT Measurement.longThe receiver-id which uniquely identifies a receiver of a stream.receiverId(long id) Set receiver-id which uniquely identifies a receiver of a stream.longTime in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.receptionDelta(long deltaNs) Set time in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.intThe session-id for the stream.sessionId(int sessionId) Set session-id for the stream.intstreamId()The stream-id for the stream.streamId(int streamId) Set stream-id for the stream.toString()Methods inherited from class io.aeron.protocol.HeaderFlyweight
appendFlagsAsChars, flags, flags, flagsToChars, frameLength, frameLength, headerType, headerType, version, versionMethods inherited from class org.agrona.concurrent.UnsafeBuffer
addIntOpaque, addIntOrdered, addIntRelease, addLongOpaque, addLongOrdered, addLongRelease, byteBuffer, compareAndExchangeInt, compareAndExchangeLong, compareAndSetInt, compareAndSetLong, ensureCapacity, getAndAddInt, getAndAddLong, getAndSetInt, getAndSetLong, getByteVolatile, getCharVolatile, getIntAcquire, getIntOpaque, getIntVolatile, getLongAcquire, getLongOpaque, getLongVolatile, getShortVolatile, isExpandable, putByteVolatile, putCharVolatile, putIntOpaque, putIntOrdered, putIntRelease, putIntVolatile, putLongOpaque, putLongOrdered, putLongRelease, putLongVolatile, putShortVolatile, verifyAlignment, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapAdjustmentMethods inherited from class org.agrona.AbstractMutableDirectBuffer
addressOffset, boundsCheck, boundsCheck0, byteArray, capacity, checkLimit, compareTo, equals, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, hashCode, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAscii, putByte, putBytes, putBytes, putBytes, putBytes, putBytes, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putIntAscii, putLong, putLong, putLongAscii, putNaturalIntAscii, putNaturalIntAsciiFromEnd, putNaturalLongAscii, putNaturalPaddedIntAscii, putShort, putShort, putStringAscii, putStringAscii, putStringAscii, putStringAscii, putStringUtf8, putStringUtf8, putStringUtf8, putStringUtf8, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthUtf8, setMemoryMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.agrona.DirectBuffer
addressOffset, boundsCheck, byteArray, capacity, checkLimit, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAsciiMethods inherited from interface org.agrona.MutableDirectBuffer
putByte, putBytes, putBytes, putBytes, putBytes, putBytes, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putIntAscii, putLong, putLong, putLongAscii, putNaturalIntAscii, putNaturalIntAsciiFromEnd, putNaturalLongAscii, putNaturalPaddedIntAscii, putShort, putShort, putStringAscii, putStringAscii, putStringAscii, putStringAscii, putStringUtf8, putStringUtf8, putStringUtf8, putStringUtf8, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthUtf8, setMemory
-
Field Details
-
REPLY_FLAG
public static final short REPLY_FLAGFlag set to indicate this is a reply message.- See Also:
-
HEADER_LENGTH
public static final int HEADER_LENGTHLength of the header of the frame.- See Also:
-
-
Constructor Details
-
RttMeasurementFlyweight
public RttMeasurementFlyweight()Default constructor which can later be used to wrap a frame. -
RttMeasurementFlyweight
Construct the flyweight over a frame.- Parameters:
buffer- containing the frame.
-
RttMeasurementFlyweight
Construct the flyweight over a frame.- Parameters:
buffer- containing the frame.
-
-
Method Details
-
sessionId
public int sessionId()The session-id for the stream.- Returns:
- session-id for the stream.
-
sessionId
Set session-id for the stream.- Parameters:
sessionId- session-id for the stream.- Returns:
- this for a fluent API.
-
streamId
public int streamId()The stream-id for the stream.- Returns:
- stream-id for the stream.
-
streamId
Set stream-id for the stream.- Parameters:
streamId- stream-id for the stream.- Returns:
- this for a fluent API.
-
echoTimestampNs
public long echoTimestampNs()Timestamp to echo in a reply or the timestamp in the original RTT Measurement.- Returns:
- timestamp to echo in a reply or the timestamp in the original RTT Measurement.
-
echoTimestampNs
Set timestamp to echo in a reply or the timestamp in the original RTT Measurement.- Parameters:
timestampNs- to echo in a reply or the timestamp in the original RTT Measurement.- Returns:
- this for a fluent API.
-
receptionDelta
public long receptionDelta()Time in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.- Returns:
- time in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.
-
receptionDelta
Set time in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.- Parameters:
deltaNs- in nanoseconds between receiving original RTT Measurement and sending Reply RTT Measurement.- Returns:
- this for a fluent API.
-
receiverId
public long receiverId()The receiver-id which uniquely identifies a receiver of a stream.- Returns:
- receiver-id which uniquely identifies a receiver of a stream.
-
receiverId
Set receiver-id which uniquely identifies a receiver of a stream.- Parameters:
id- for the receiver of the stream.- Returns:
- this for a fluent API.
-
toString
- Overrides:
toStringin classUnsafeBuffer
-