Class CorrelatedMessageFlyweight

java.lang.Object
io.aeron.command.CorrelatedMessageFlyweight
Direct Known Subclasses:
CounterMessageFlyweight, DestinationByIdMessageFlyweight, DestinationMessageFlyweight, GetNextAvailableSessionIdMessageFlyweight, PublicationMessageFlyweight, RejectImageFlyweight, RemoveMessageFlyweight, StaticCounterMessageFlyweight, SubscriptionMessageFlyweight, TerminateDriverFlyweight

public class CorrelatedMessageFlyweight extends Object
Base flyweight that can be extended to track a client request.

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 | | | +---------------------------------------------------------------+ | Correlation ID | | | +---------------------------------------------------------------+

  • Field Details

  • Constructor Details

    • CorrelatedMessageFlyweight

      public CorrelatedMessageFlyweight()
  • Method Details

    • wrap

      public CorrelatedMessageFlyweight wrap(MutableDirectBuffer buffer, int offset)
      Wrap the buffer at a given offset for updates.
      Parameters:
      buffer - to wrap.
      offset - at which the message begins.
      Returns:
      this for a fluent API.
    • clientId

      public long clientId()
      Get client id field.
      Returns:
      client id field.
    • clientId

      public CorrelatedMessageFlyweight clientId(long clientId)
      Set client id field.
      Parameters:
      clientId - field value.
      Returns:
      this for a fluent API.
    • correlationId

      public long correlationId()
      Get correlation id field.
      Returns:
      correlation id field.
    • correlationId

      public CorrelatedMessageFlyweight correlationId(long correlationId)
      Set correlation id field.
      Parameters:
      correlationId - field value.
      Returns:
      this for a fluent API.
    • validateLength

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