Class DestinationByIdMessageFlyweight

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

public class DestinationByIdMessageFlyweight extends CorrelatedMessageFlyweight
Control message for removing a destination for a Publication in multi-destination-cast or a Subscription in multi-destination Subscription.
   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                     |
  |                                                               |
  +---------------------------------------------------------------+
  |                    Resource Correlation ID                    |
  |                                                               |
  +---------------------------------------------------------------+
  |                   Destination Correlation ID                  |
  |                                                               |
  +---------------------------------------------------------------+
 
  • Field Details

    • MESSAGE_LENGTH

      public static final int MESSAGE_LENGTH
      Length of the encoded message in bytes.
      See Also:
  • Constructor Details

    • DestinationByIdMessageFlyweight

      public DestinationByIdMessageFlyweight()
  • Method Details

    • wrap

      public DestinationByIdMessageFlyweight wrap(MutableDirectBuffer buffer, int offset)
      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.
    • resourceRegistrationId

      public long resourceRegistrationId()
      Get the registration id used for the resource that the destination has been registered to. Typically, a subscription or publication.
      Returns:
      resource registration id field.
    • resourceRegistrationId

      public DestinationByIdMessageFlyweight resourceRegistrationId(long registrationId)
      Set the registration id used for the resource that the destination has been registered to. Typically, a subscription or publication.
      Parameters:
      registrationId - field value.
      Returns:
      this for a fluent API.
    • destinationRegistrationId

      public long destinationRegistrationId()
      Returns the registration id for the destination.
      Returns:
      destination registration id.
    • destinationRegistrationId

      public DestinationByIdMessageFlyweight destinationRegistrationId(long destinationRegistrationId)
      Sets the registration id for the destination.
      Parameters:
      destinationRegistrationId - to reference the destination.
      Returns:
      this for a fluent API.
    • 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.