Struct sled::ConfigBuilder[][src]

pub struct ConfigBuilder { /* fields omitted */ }

Top-level configuration for the system.

Examples

let _config = pagecache::ConfigBuilder::default()
    .path("/path/to/data".to_owned())
    .cache_capacity(10_000_000_000)
    .use_compression(true)
    .flush_every_ms(Some(1000))
    .snapshot_after_ops(100_000);
// Read-only mode
let _config = pagecache::ConfigBuilder::default()
    .path("/path/to/data".to_owned())
    .read_only(true);

Methods

impl ConfigBuilder
[src]

Returns a default ConfigBuilder

Set the path of the database (builder).

Set the path of the database

Set the merge operator that can be relied on during merges in the PageCache.

Finalize the configuration.

number of io buffers

number of io buffers

size of each io flush buffer. MUST be multiple of 512!

size of each io flush buffer. MUST be multiple of 512!

minimum data chunks/pages in a segment.

minimum data chunks/pages in a segment.

b-link node fanout, minimum of 2

b-link node fanout, minimum of 2

page consolidation threshold

page consolidation threshold

if this database should be removed after the ConfigBuilder is dropped

if this database should be removed after the ConfigBuilder is dropped

whether to run in read-only mode

whether to run in read-only mode

log base 2 of the number of cache shards

log base 2 of the number of cache shards

maximum size for the system page cache

maximum size for the system page cache

whether to use the OS page cache

whether to use the OS page cache

whether to use zstd compression

whether to use zstd compression

the compression factor to use with zstd compression

the compression factor to use with zstd compression

number of ms between IO buffer flushes

number of ms between IO buffer flushes

number of operations between page table snapshots

number of operations between page table snapshots

the maximum length of a cached page fragment chain

the maximum length of a cached page fragment chain

the proportion of remaining valid pages in the segment

the proportion of remaining valid pages in the segment

the minimum number of free segments to have on-deck before a compaction occurs

the minimum number of free segments to have on-deck before a compaction occurs

disabling of the log segment copy cleaner

disabling of the log segment copy cleaner

the file segment selection mode

the file segment selection mode

snapshot file location

snapshot file location

Trait Implementations

impl Send for ConfigBuilder
[src]

impl Clone for ConfigBuilder
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Serialize for ConfigBuilder
[src]

Serialize this value into the given Serde serializer. Read more

impl Default for ConfigBuilder
[src]

Returns the "default value" for a type. Read more

impl<'de> Deserialize<'de> for ConfigBuilder
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Debug for ConfigBuilder
[src]

Formats the value using the given formatter. Read more

impl PartialEq<ConfigBuilder> for ConfigBuilder
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations