Class BroadcastBufferDescriptor


  • public final class BroadcastBufferDescriptor
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      static int LATEST_COUNTER_OFFSET
      Offset within the trailer for where the latest sequence value is stored.
      static int TAIL_COUNTER_OFFSET
      Offset within the trailer for where the tail value is stored.
      static int TAIL_INTENT_COUNTER_OFFSET
      Offset within the trailer for where the tail intended value is stored.
      static int TRAILER_LENGTH
      Total size of the trailer.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkCapacity​(int capacity)
      Check the buffer capacity is the correct size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 Detail

      • BroadcastBufferDescriptor

        private BroadcastBufferDescriptor()
    • Method Detail

      • checkCapacity

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