nsmcp::BoundedLogScanner method init (protected)

 <instance of nsmcp::BoundedLogScanner[i]> init

Defined in /usr/local/ns/tcl/nsmcp/log-01-scanner.tcl

Testcases:
No testcase defined.
Source code:
if {[llength ${:literals}]<1 || [llength ${:literals}]>20} {error "scanner requires 1..20 literals"}
if {${:blockBytes}<1 || ${:blockBytes}>8388608 || ${:nativeThreshold}<1} {error "invalid scanner buffer limits"}
foreach literal ${:literals} {
    set bytes [encoding convertto utf-8 $literal]
    set length [string length $bytes]
    if {$length<1 || $length>4096 || [regexp {[\x00\r\n]} $literal]} {error "scanner literals must be 1..4096 UTF-8 bytes without CR/LF/NUL"}
    lappend :keys $bytes
    set :overlap [expr {max(${:overlap},$length-1)}]
}
set :blockBytes [expr {max(${:blockBytes},${:overlap}+1)}]
set :readBytes [expr {min(${:blockBytes},65536)}]
if {${:channel} ne "" && (![string is entier -strict ${:limit}] || ${:limit}<0)} {error "scanner requires a fixed nonnegative byte limit"}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: