Class BroadcastBufferDescriptor

java.lang.Object
org.agrona.concurrent.broadcast.BroadcastBufferDescriptor

public final class BroadcastBufferDescriptor extends Object
Layout of the broadcast buffer. The buffer consists of a ring of messages that is a power of 2 in size. This is followed by a trailer section containing state information about the ring.
  • Field Details

    • TAIL_INTENT_COUNTER_OFFSET

      public static final int TAIL_INTENT_COUNTER_OFFSET
      Offset within the trailer for where the tail intended value is stored.
    • TAIL_COUNTER_OFFSET

      public static final int TAIL_COUNTER_OFFSET
      Offset within the trailer for where the tail value is stored.
    • LATEST_COUNTER_OFFSET

      public static final int LATEST_COUNTER_OFFSET
      Offset within the trailer for where the latest sequence value is stored.
    • TRAILER_LENGTH

      public static final int TRAILER_LENGTH
      Total size of the trailer.
  • Constructor Details

    • BroadcastBufferDescriptor

      private BroadcastBufferDescriptor()
  • Method Details

    • checkCapacity

      public static void checkCapacity(int capacity)
      Check the buffer capacity is the correct size.
      Parameters:
      capacity - to be checked.
      Throws:
      IllegalStateException - if the buffer capacity is not a power of 2.