Class TermRebuilder

java.lang.Object
io.aeron.logbuffer.TermRebuilder

public class TermRebuilder extends Object
Rebuild a term buffer from received frames which can be out-of-order. The resulting data structure will only monotonically increase in state.
  • Constructor Details

    • TermRebuilder

      public TermRebuilder()
  • Method Details

    • insert

      public static void insert(UnsafeBuffer termBuffer, int termOffset, UnsafeBuffer packet, int length)
      Insert a packet of frames into the log at the appropriate termOffset as indicated by the term termOffset header.

      If the packet has already been inserted then this is a noop.

      Parameters:
      termBuffer - into which the packet should be inserted.
      termOffset - in the term at which the packet should be inserted.
      packet - containing a sequence of frames.
      length - of the packet of frames in bytes.