pub struct SequentialFileReaderBuilder<'sp> { /* private fields */ }Expand description
Utility for building SequentialFileReader with specified tuning options.
Implementations§
Source§impl<'sp> SequentialFileReaderBuilder<'sp>
impl<'sp> SequentialFileReaderBuilder<'sp>
pub fn new() -> Self
Sourcepub fn use_registered_buffers(self, register_buffers: bool) -> Self
pub fn use_registered_buffers(self, register_buffers: bool) -> Self
Set whether to register buffer with io_uring for improved performance.
Enabling requires available memlock ulimit to be higher than sizes of registered buffers.
Sourcepub fn use_direct_io(self, use_direct_io: bool) -> Self
pub fn use_direct_io(self, use_direct_io: bool) -> Self
Read files in direct-IO mode (disables kernel caching of read contents).
Enabling requires the filesystem to support directio and read_capacity
to be a multiple of 4096.
Use (or remove) a shared kernel thread to drain submission queue for IO operations
Sourcepub fn build<'a>(self, buf_capacity: usize) -> Result<SequentialFileReader<'a>>
pub fn build<'a>(self, buf_capacity: usize) -> Result<SequentialFileReader<'a>>
Build a new SequentialFileReader with internally allocated buffer.
Buffer will hold at least buf_capacity bytes (increased to read_capacity if it’s lower).
Initially the reader is idle and starts reading after set_file is called. It will then execute
multiple read_capacity sized reads in parallel to fill the buffer.