Class ImageBuffersReadyFlyweight

java.lang.Object
io.aeron.command.ImageBuffersReadyFlyweight

public class ImageBuffersReadyFlyweight extends Object
Message to denote that new buffers for a publication image are ready for a subscription.

Note: Layout should be SBE 2.0 compliant so that the source identity length is aligned.

See Also:
  • Constructor Details

    • ImageBuffersReadyFlyweight

      public ImageBuffersReadyFlyweight()
  • Method Details

    • wrap

      public final ImageBuffersReadyFlyweight 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.
    • correlationId

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

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

      public int sessionId()
      Get the session id field.
      Returns:
      session id field.
    • sessionId

      public ImageBuffersReadyFlyweight sessionId(int sessionId)
      Set session id field.
      Parameters:
      sessionId - field value.
      Returns:
      this for a fluent API.
    • streamId

      public int streamId()
      The stream id field.
      Returns:
      stream id field.
    • streamId

      public ImageBuffersReadyFlyweight streamId(int streamId)
      Set stream id field.
      Parameters:
      streamId - field value.
      Returns:
      this for a fluent API.
    • subscriberPositionId

      public ImageBuffersReadyFlyweight subscriberPositionId(int id)
      Set the position counter Id for the subscriber.
      Parameters:
      id - for the subscriber position counter.
      Returns:
      this for a fluent API.
    • subscriberPositionId

      public int subscriberPositionId()
      The position counter Id for the subscriber.
      Returns:
      position counter Id for the subscriber.
    • subscriptionRegistrationId

      public ImageBuffersReadyFlyweight subscriptionRegistrationId(long id)
      Set the registration Id for the Subscription.
      Parameters:
      id - for the Subscription.
      Returns:
      this for a fluent API.
    • subscriptionRegistrationId

      public long subscriptionRegistrationId()
      Return the registration Id for the Subscription.
      Returns:
      registration Id for the Subscription.
    • logFileName

      public String logFileName()
      The Log Filename in ASCII.
      Returns:
      log filename.
    • appendLogFileName

      public void appendLogFileName(Appendable appendable)
      Append the log file name to an Appendable.
      Parameters:
      appendable - to append log file name to.
    • logFileName

      public ImageBuffersReadyFlyweight logFileName(String logFileName)
      Set the log filename in ASCII.
      Parameters:
      logFileName - for the image.
      Returns:
      this for a fluent API.
    • sourceIdentity

      public String sourceIdentity()
      The source identity string in ASCII.
      Returns:
      source identity string.
    • appendSourceIdentity

      public void appendSourceIdentity(Appendable appendable)
      Append the source identity to an Appendable.
      Parameters:
      appendable - to append source identity to.
    • sourceIdentity

      public ImageBuffersReadyFlyweight sourceIdentity(String value)
      Set the source identity string in ASCII.

      Note: Can be called only after log file name was set!

      Parameters:
      value - for the source identity.
      Returns:
      this for a fluent API.
      See Also:
    • length

      public int length()
      Get the length of the current message.

      NB: must be called after the data is written in order to be accurate.

      Returns:
      the length of the current message.