public class TermBlockScanner
extends java.lang.Object
Constructor and Description |
---|
TermBlockScanner() |
Modifier and Type | Method and Description |
---|---|
static int |
scan(org.agrona.concurrent.UnsafeBuffer termBuffer,
int termOffset,
int limitOffset)
Scan a term buffer for a block of message fragments from an offset up to a limitOffset.
|
public static int scan(org.agrona.concurrent.UnsafeBuffer termBuffer, int termOffset, int 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
.
termBuffer
- to scan for message fragments.termOffset
- at which the scan should begin.limitOffset
- at which the scan should stop.Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.