- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsmcp::BoundedLogScanner
::nsmcp::BoundedLogScannercreate ... \
[ -blockBytes:integer (default "4194304") ] \
[ -buffer (default "") ] \
[ -bufferEnd (default "0") ] \
[ -bufferFrom (default "0") ] \
[ -cacheDirectory:required cacheDirectory:required ] \
[ -channel (default "") ] \
[ -keys (default "") ] \
[ -limit (default "") ] \
[ -literals:required literals:required ] \
[ -overlap (default "0") ] \
[ -readBytes (default "65536") ] \
[ -readCalls (default "0") ] \
[ -readMicroseconds (default "0") ] \
[ -sourceBytes (default "0") ] \
[ -windowCeiling (default "-1") ] \
[ -windowHits (default "0") ]
Defined in /usr/local/ns/tcl/nsmcp/log-01-scanner.tcl
Class Relations
Methods (to be applied on instances)
find (scripted, public)
<instance of nsmcp::BoundedLogScanner> find from [ ceiling ]
Find the earliest candidate within a fixed byte interval. Use overlapping bounded windows for channels or the current memory chunk; never read beyond the ceiling.
- Parameters:
- from (required)
- Inclusive starting byte offset within the fixed scan interval.
- ceiling (optional)
- Exclusive upper byte bound; empty uses the configured scanner limit.
- Returns:
- The candidate byte offset, or -1 when no candidate is found.
- Testcases:
- No testcase defined.
load (scripted, public)
<instance of nsmcp::BoundedLogScanner> load bytes
Load a bounded in-memory byte chunk for candidate scanning. Reject channel-backed scanners and chunks larger than the configured block bound.
- Parameters:
- bytes (required)
- Raw binary chunk, no larger than the configured block limit.
- Returns:
- The new in-memory byte limit.
- Testcases:
- No testcase defined.
nextLine (scripted, public)
<instance of nsmcp::BoundedLogScanner> nextLine position \ [ filter ]
Read an in-memory physical line, optionally using the literal prefilter. Return physical byte bounds and newline status without parsing or redacting the record.
- Parameters:
- position (required)
- Physical byte cursor within the loaded chunk.
- filter (optional, defaults to
"true")- Whether to apply the literal candidate prefilter; false reads sequentially. Defaults to 'true'.
- Returns:
- A dictionary with start, end, raw and terminated fields, or an empty result at exhaustion.
- Testcases:
- No testcase defined.
statistics (scripted, public)
<instance of nsmcp::BoundedLogScanner> statistics
Report source-channel work performed by this scanner. Counts describe Tcl channel reads, including overlapping windows, not physical disk operations. In-memory scanning performs no channel I/O.
- Returns:
- A dictionary with readMicroseconds, readBytes and readCalls.
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)