Class RttMeasurementFlyweight

All Implemented Interfaces:
Comparable<DirectBuffer>, AtomicBuffer, DirectBuffer, MutableDirectBuffer

public class RttMeasurementFlyweight extends HeaderFlyweight
Flyweight for an RTT Measurement Frame Header.

RTT Measurement Frame Header wiki page.

  • Field Details

    • REPLY_FLAG

      public static final short REPLY_FLAG
      Flag set to indicate this is a reply message.
      See Also:
    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      Length 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

      public RttMeasurementFlyweight(ByteBuffer buffer)
      Construct the flyweight over a frame.
      Parameters:
      buffer - containing the frame.
    • RttMeasurementFlyweight

      public RttMeasurementFlyweight(UnsafeBuffer buffer)
      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

      public RttMeasurementFlyweight sessionId(int 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

      public RttMeasurementFlyweight streamId(int 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

      public RttMeasurementFlyweight echoTimestampNs(long timestampNs)
      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

      public RttMeasurementFlyweight receptionDelta(long deltaNs)
      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

      public RttMeasurementFlyweight receiverId(long id)
      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

      public String toString()
      Overrides:
      toString in class UnsafeBuffer