pub struct DiskOrderedCursorConfig {
pub queue_size: usize,
pub lsn_batch_size: usize,
pub internal_memory_limit: usize,
pub keys_only: bool,
pub bins_only: bool,
pub count_only: bool,
pub dedup_keys: bool,
}Expand description
Configuration for a DiskOrderedCursor.
Mirrors the field set of DiskOrderedCursorConfig but uses
Rust-idiomatic builder methods. All fields have sensible defaults
matching JE.
Fields§
§queue_size: usizeMaximum number of (key, data) entries the producer thread may queue
before blocking.
Default: 1000 (matches JE’s DOS_PRODUCER_QUEUE_SIZE).
lsn_batch_size: usizeMaximum number of LSNs the producer accumulates before yielding a batch downstream. Currently advisory — the producer streams entries one at a time; this field is preserved for JE shape compatibility and future batched-fetch support.
Default: usize::MAX.
internal_memory_limit: usizeMaximum number of bytes the in-flight queue may occupy before the producer thread blocks. Approximate — measured as the sum of key + data lengths of buffered entries.
Default: usize::MAX.
keys_only: boolIf true, only keys are read from the log; data is left empty.
Slightly faster because the on-disk LN value bytes are skipped.
Default: false.
bins_only: boolJE legacy flag — scan only BIN entries. Honoured as an alias for
keys_only in this implementation because Noxu’s log iterator
always emits LN payloads (no separate BIN-only scan path is
available at this layer).
Default: false.
count_only: boolJE legacy flag — count records without materialising key/data.
Currently honoured as keys_only plus a discard policy on data.
next() still returns one Success per record so the application
can compute the count by iterating.
Default: false.
dedup_keys: boolNoxu extension. If true, the cursor maintains a HashSet of
(db_idx, key) pairs already returned and skips duplicates. This
can be expensive on large scans — the set grows linearly with
distinct keys. Default false matches JE.
Note: even with dedup_keys = true, the cursor returns the first
version of a key that the log scan encounters, which is the
oldest version — not the latest. For latest-only semantics
the application must run a regular B-tree scan.
Implementations§
Source§impl DiskOrderedCursorConfig
impl DiskOrderedCursorConfig
Sourcepub fn with_queue_size(self, queue_size: usize) -> Self
pub fn with_queue_size(self, queue_size: usize) -> Self
Sets the producer queue size.
Sourcepub fn with_lsn_batch_size(self, lsn_batch_size: usize) -> Self
pub fn with_lsn_batch_size(self, lsn_batch_size: usize) -> Self
Sets the LSN batch size (advisory).
Sourcepub fn with_internal_memory_limit(self, internal_memory_limit: usize) -> Self
pub fn with_internal_memory_limit(self, internal_memory_limit: usize) -> Self
Sets the internal memory limit in bytes.
Sourcepub fn with_keys_only(self, keys_only: bool) -> Self
pub fn with_keys_only(self, keys_only: bool) -> Self
Sets keys-only mode (no data is read).
Sourcepub fn with_bins_only(self, bins_only: bool) -> Self
pub fn with_bins_only(self, bins_only: bool) -> Self
Sets BINs-only mode (alias for keys_only in Noxu).
Sourcepub fn with_count_only(self, count_only: bool) -> Self
pub fn with_count_only(self, count_only: bool) -> Self
Sets count-only mode.
Sourcepub fn with_dedup_keys(self, dedup_keys: bool) -> Self
pub fn with_dedup_keys(self, dedup_keys: bool) -> Self
Enables client-side dedup of repeated keys.
Trait Implementations§
Source§impl Clone for DiskOrderedCursorConfig
impl Clone for DiskOrderedCursorConfig
Source§fn clone(&self) -> DiskOrderedCursorConfig
fn clone(&self) -> DiskOrderedCursorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more