nsmcp::BoundedLogScanner method first (protected)
<instance of nsmcp::BoundedLogScanner> first position ceiling
Defined in /usr/local/ns/tcl/nsmcp/log-01-scanner.tcl
- Parameters:
- position (required)
- ceiling (required)
- Testcases:
- No testcase defined.
Source code: set relative [expr {$position-${:bufferFrom}}] set available [expr {$ceiling-${:bufferFrom}}] set found -1 # Search the existing bytes directly. A scratch file adds writes and # descriptor operations without improving the bounded search contract. set buffer ${:buffer} foreach key ${:keys} { set candidate [string first $key $buffer $relative] if {$candidate>=0 && $candidate+[string length $key]<=$available && ($found<0 || $candidate<$found)} { set found $candidate } } if {$found>=0} { return [expr {${:bufferFrom}+$found}] } return -1XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)