Class GetNextAvailableSessionIdMessageFlyweight

java.lang.Object
io.aeron.command.CorrelatedMessageFlyweight
io.aeron.command.GetNextAvailableSessionIdMessageFlyweight

public final class GetNextAvailableSessionIdMessageFlyweight extends CorrelatedMessageFlyweight
Control message for getting next available session id from the media driver (ControlProtocolEvents.GET_NEXT_AVAILABLE_SESSION_ID).
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                          Client ID                            |
  |                                                               |
  +---------------------------------------------------------------+
  |                    Command Correlation ID                     |
  |                                                               |
  +---------------------------------------------------------------+
  |                         Stream Id                             |
  +---------------------------------------------------------------+
 
  • Field Details

  • Constructor Details

    • GetNextAvailableSessionIdMessageFlyweight

      public GetNextAvailableSessionIdMessageFlyweight()
  • Method Details

    • wrap

      Wrap the buffer at a given offset for updates.
      Overrides:
      wrap in class CorrelatedMessageFlyweight
      Parameters:
      buffer - to wrap.
      offset - at which the message begins.
      Returns:
      this for a fluent API.
    • streamId

      public int streamId()
      Get the stream id.
      Returns:
      the stream id.
    • streamId

      public GetNextAvailableSessionIdMessageFlyweight streamId(int streamId)
      Set the stream id.
      Parameters:
      streamId - the channel id.
      Returns:
      this for a fluent API.
    • length

      public int length()
      Length of the message in bytes. Only valid after the channel is set.
      Returns:
      length of the message in bytes.
    • validateLength

      public void validateLength(int msgTypeId, int length)
      Validate buffer length is long enough for message.
      Overrides:
      validateLength in class CorrelatedMessageFlyweight
      Parameters:
      msgTypeId - type of message.
      length - of message in bytes to validate.