Table of Contents

Public namespace Rowles.LeanLucene.Store

Classes

Internal classInternal DirectoryFsync

Cross-platform helper that flushes a directory's metadata (file-entry renames, creations, deletions) to durable storage. Required for crash-safe atomic-rename commit protocols on POSIX filesystems where directory entries are buffered independently of file contents.

Public class IndexInput

Readable input over a memory-mapped file. Maintains a position cursor and uses System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Byte@) for primitive reads. Acquired pointer is held for the lifetime of the accessor to avoid repeated acquire/release overhead.

Public class IndexOutput

Buffered sequential writer backed by System.IO.FileStream and System.Buffers.ArrayPool`1. Used at index-build time only.

Public class LeanDirectory

Abstract base for storage operations. Named LeanDirectory to avoid collision with System.IO.Directory.

Public class MMapDirectory

Primary directory implementation using memory-mapped files for reads and buffered file streams for writes.

Internal classInternal NativeMethods

Platform-specific P/Invoke declarations for memory prefetch hints. All calls are advisory — failures do not affect correctness.

Public class WriteLockException

Thrown when an IndexWriter cannot acquire the write lock because another writer already holds it for the same directory.

Structs

Internal structInternal NativeMethods.WIN32_MEMORY_RANGE_ENTRY