Class TermBlockScanner

java.lang.Object
io.aeron.logbuffer.TermBlockScanner

public class TermBlockScanner extends Object
Scan a term buffer for a block of message fragments including padding. The block must include complete fragments.
  • Constructor Details

    • TermBlockScanner

      public TermBlockScanner()
  • Method Details

    • scan

      public static int scan(UnsafeBuffer termBuffer, int termOffset, int limitOffset)
      Scan a term buffer for a block of message fragments from an offset up to a limitOffset.

      A scan will terminate if a padding frame is encountered. If first frame in a scan is padding then a block for the padding is notified. If the padding comes after the first frame in a scan then the scan terminates at the offset the padding frame begins. Padding frames are delivered singularly in a block.

      Padding frames may be for a greater range than the limit offset but only the header needs to be valid so relevant length of the frame is DataHeaderFlyweight.HEADER_LENGTH.

      Parameters:
      termBuffer - to scan for message fragments.
      termOffset - at which the scan should begin.
      limitOffset - at which the scan should stop.
      Returns:
      the offset at which the scan terminated.