Struct rsdb::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
Top-level configuration for the system.
Examples
let config = rsdb::Config::default() .path(Some("/path/to/data".to_owned())) .cache_capacity(10_000_000_000) .use_compression(true) .flush_every_ms(Some(1000)) .snapshot_after_ops(100_000);
Methods
impl Config
[src]
fn get_io_bufs(&self) -> usize
Get number of io buffers
fn set_io_bufs(&mut self, to: usize)
Set number of io buffers
fn io_bufs(&self, to: usize) -> Config
Builder, set number of io buffers
fn get_io_buf_size(&self) -> usize
Get size of each io flush buffer
fn set_io_buf_size(&mut self, to: usize)
Set size of each io flush buffer
fn io_buf_size(&self, to: usize) -> Config
Builder, set size of each io flush buffer
fn get_blink_fanout(&self) -> usize
Get b-link node fanout
fn set_blink_fanout(&mut self, to: usize)
Set b-link node fanout
fn blink_fanout(&self, to: usize) -> Config
Builder, set b-link node fanout
fn get_page_consolidation_threshold(&self) -> usize
Get page consolidation threshold
fn set_page_consolidation_threshold(&mut self, to: usize)
Set page consolidation threshold
fn page_consolidation_threshold(&self, to: usize) -> Config
Builder, set page consolidation threshold
fn get_path(&self) -> Option<String>
Get path for the main storage file
fn set_path(&mut self, to: Option<String>)
Set path for the main storage file
fn path(&self, to: Option<String>) -> Config
Builder, set path for the main storage file
fn get_cache_bits(&self) -> usize
Get log base 2 of the number of cache shards
fn set_cache_bits(&mut self, to: usize)
Set log base 2 of the number of cache shards
fn cache_bits(&self, to: usize) -> Config
Builder, set log base 2 of the number of cache shards
fn get_cache_capacity(&self) -> usize
Get maximum size for the system page cache
fn set_cache_capacity(&mut self, to: usize)
Set maximum size for the system page cache
fn cache_capacity(&self, to: usize) -> Config
Builder, set maximum size for the system page cache
fn get_use_os_cache(&self) -> bool
Get whether to use the OS page cache
fn set_use_os_cache(&mut self, to: bool)
Set whether to use the OS page cache
fn use_os_cache(&self, to: bool) -> Config
Builder, set whether to use the OS page cache
fn get_use_compression(&self) -> bool
Get whether to use zstd compression
fn set_use_compression(&mut self, to: bool)
Set whether to use zstd compression
fn use_compression(&self, to: bool) -> Config
Builder, set whether to use zstd compression
fn get_flush_every_ms(&self) -> Option<u64>
Get number of ms between IO buffer flushes
fn set_flush_every_ms(&mut self, to: Option<u64>)
Set number of ms between IO buffer flushes
fn flush_every_ms(&self, to: Option<u64>) -> Config
Builder, set number of ms between IO buffer flushes
fn get_snapshot_after_ops(&self) -> usize
Get number of operations between page table snapshots
fn set_snapshot_after_ops(&mut self, to: usize)
Set number of operations between page table snapshots
fn snapshot_after_ops(&self, to: usize) -> Config
Builder, set number of operations between page table snapshots
fn get_snapshot_path(&self) -> Option<String>
Get snapshot file location
fn set_snapshot_path(&mut self, to: Option<String>)
Set snapshot file location
fn snapshot_path(&self, to: Option<String>) -> Config
Builder, set snapshot file location
fn tree(&self) -> Tree
create a new Tree
based on this configuration
fn log(&self) -> LockFreeLog
create a new LockFreeLog
based on this configuration
fn cached_file(&self) -> Rc<RefCell<File>>
Retrieve a thread-local file handle to the configured underlying storage, or create a new one if this is the first time the thread is accessing it.
Trait Implementations
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more