Class StatusMessageFlyweight

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

public class StatusMessageFlyweight extends HeaderFlyweight
Flyweight for a Status Message Frame.

Status Message wiki page.

  • Field Details

    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      Length of the Status Message Frame.
      See Also:
    • SEND_SETUP_FLAG

      public static final short SEND_SETUP_FLAG
      Publisher should send SETUP frame.
      See Also:
    • END_OF_STREAM_FLAG

      public static final short END_OF_STREAM_FLAG
      Publisher should treat Subscriber as going away.
      See Also:
  • Constructor Details

    • StatusMessageFlyweight

      public StatusMessageFlyweight()
      Default constructor which can later be used to wrap a frame.
    • StatusMessageFlyweight

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

      public StatusMessageFlyweight(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 StatusMessageFlyweight sessionId(int sessionId)
      Set the session-id of the stream.
      Parameters:
      sessionId - field value.
      Returns:
      this for a fluent API.
    • streamId

      public int streamId()
      The stream-id for the stream.
      Returns:
      the session-id for the stream.
    • streamId

      public StatusMessageFlyweight streamId(int streamId)
      Set the session-id for the stream.
      Parameters:
      streamId - field value.
      Returns:
      this for a fluent API.
    • consumptionTermOffset

      public int consumptionTermOffset()
      The highest consumption offset within the term.
      Returns:
      the highest consumption offset within the term.
    • consumptionTermOffset

      public StatusMessageFlyweight consumptionTermOffset(int termOffset)
      Set the highest consumption offset within the term.
      Parameters:
      termOffset - field value.
      Returns:
      this for a fluent API.
    • consumptionTermId

      public int consumptionTermId()
      The highest consumption term-id.
      Returns:
      highest consumption term-id.
    • consumptionTermId

      public StatusMessageFlyweight consumptionTermId(int termId)
      Set the highest consumption term-id.
      Parameters:
      termId - field value.
      Returns:
      this for a fluent API.
    • receiverWindowLength

      public int receiverWindowLength()
      The receiver window length they will accept.
      Returns:
      receiver window length they will accept.
    • receiverWindowLength

      public StatusMessageFlyweight receiverWindowLength(int receiverWindowLength)
      Set the receiver window length they will accept.
      Parameters:
      receiverWindowLength - field value.
      Returns:
      this for a fluent API.
    • receiverId

      public long receiverId()
      Identifier for the receiver to distinguish them for FlowControl strategies.
      Returns:
      identifier for the receiver to distinguish them for FlowControl strategies.
    • receiverId

      public StatusMessageFlyweight receiverId(long id)
      Identifier for the receiver to distinguish them for FlowControl strategies.
      Parameters:
      id - for the receiver to distinguish them for FlowControl strategies.
      Returns:
      this for a fluent API.
    • asfLength

      public int asfLength()
      The length of the Application Specific Feedback (or gtag).
      Returns:
      length, in bytes, of the Application Specific Feedback (or gtag).
    • groupTag

      public long groupTag()
      The group tag (if present) from the Status Message.
      Returns:
      the group tag value or 0 if not present.
    • groupTag

      public StatusMessageFlyweight groupTag(Long groupTag)
      Set the Receiver Group Tag for the Status Message.
      Parameters:
      groupTag - value to set if not null.
      Returns:
      this for a fluent API.
    • groupTagFieldOffset

      public static int groupTagFieldOffset()
      Return the field offset within the flyweight for the group tag field.
      Returns:
      offset of group tag field
    • getLongUnaligned

      public long getLongUnaligned(int offset)
      Get long value from a field that is not aligned on an 8 byte boundary.
      Parameters:
      offset - of the field to get.
      Returns:
      value of field.
    • putLongUnaligned

      public StatusMessageFlyweight putLongUnaligned(int offset, long value)
      Set long value into a field that is not aligned on an 8 byte boundary.
      Parameters:
      offset - of the field to put.
      value - of the field to put.
      Returns:
      this for fluent API.
    • toString

      public String toString()
      Overrides:
      toString in class UnsafeBuffer