Class DataFrameDescriptor

java.lang.Object
io.camunda.zeebe.dispatcher.impl.log.DataFrameDescriptor

public final class DataFrameDescriptor extends Object
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |R|                        Frame Length                         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+
  |  Version      |B|E|F| Flags   |             Type              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+
  |                            StreamId                           |
  +---------------------------------------------------------------+
  |                                                               |
  |                            Message                           ...
 ...                                                              |
  +---------------------------------------------------------------+
 

Frame length: Including the length of the header to ensure length is always > 0 which is important for distinguishing committed from uncommitted but claimed fragments.

Flags:

  • B: Begin Batch
  • E: End Batch
  • F: Failed (e.g. set by a prior subscriber)
  • Field Details

    • FRAME_ALIGNMENT

      public static final int FRAME_ALIGNMENT
      See Also:
    • FRAME_LENGTH_OFFSET

      public static final int FRAME_LENGTH_OFFSET
    • VERSION_OFFSET

      public static final int VERSION_OFFSET
    • FLAGS_OFFSET

      public static final int FLAGS_OFFSET
    • TYPE_OFFSET

      public static final int TYPE_OFFSET
    • STREAM_ID_OFFSET

      public static final int STREAM_ID_OFFSET
    • TYPE_MESSAGE

      public static final short TYPE_MESSAGE
      See Also:
    • TYPE_PADDING

      public static final short TYPE_PADDING
      See Also:
    • HEADER_LENGTH

      public static final int HEADER_LENGTH
    • FLAG_BATCH_BEGIN_BITMASK

      public static final int FLAG_BATCH_BEGIN_BITMASK
      See Also:
    • FLAG_BATCH_END_BITMASK

      public static final int FLAG_BATCH_END_BITMASK
      See Also:
    • FLAG_FAILED_BITMASK

      public static final int FLAG_FAILED_BITMASK
      See Also:
  • Constructor Details

    • DataFrameDescriptor

      public DataFrameDescriptor()
  • Method Details

    • lengthOffset

      public static int lengthOffset(int offset)
    • versionOffset

      public static int versionOffset(int offset)
    • flagsOffset

      public static int flagsOffset(int offset)
    • typeOffset

      public static int typeOffset(int offset)
    • streamIdOffset

      public static int streamIdOffset(int offset)
    • messageOffset

      public static int messageOffset(int offset)
    • alignedFramedLength

      public static int alignedFramedLength(int msgLength)
    • alignedLength

      public static int alignedLength(int msgLength)
    • framedLength

      public static int framedLength(int msgLength)
    • messageLength

      public static int messageLength(int framedLength)
    • flagFailed

      public static boolean flagFailed(byte flags)
    • enableFlagFailed

      public static byte enableFlagFailed(byte flags)
    • flagBatchBegin

      public static boolean flagBatchBegin(byte flags)
    • enableFlagBatchBegin

      public static byte enableFlagBatchBegin(byte flags)
    • flagBatchEnd

      public static boolean flagBatchEnd(byte flags)
    • enableFlagBatchEnd

      public static byte enableFlagBatchEnd(byte flags)