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]

[src]

Returns a default ConfigBuilder

[src]

Set the path of the database (builder).

[src]

Set the path of the database

[src]

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

[src]

Finalize the configuration.

[src]

number of io buffers

[src]

number of io buffers

[src]

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

[src]

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

[src]

minimum data chunks/pages in a segment.

[src]

minimum data chunks/pages in a segment.

b-link node fanout, minimum of 2

b-link node fanout, minimum of 2

[src]

page consolidation threshold

[src]

page consolidation threshold

[src]

if this database should be removed after the ConfigBuilder is dropped

[src]

if this database should be removed after the ConfigBuilder is dropped

[src]

whether to run in read-only mode

[src]

whether to run in read-only mode

[src]

log base 2 of the number of cache shards

[src]

log base 2 of the number of cache shards

[src]

maximum size for the system page cache

[src]

maximum size for the system page cache

[src]

whether to use the OS page cache

[src]

whether to use the OS page cache

[src]

whether to use zstd compression

[src]

whether to use zstd compression

[src]

the compression factor to use with zstd compression

[src]

the compression factor to use with zstd compression

[src]

number of ms between IO buffer flushes

[src]

number of ms between IO buffer flushes

[src]

number of operations between page table snapshots

[src]

number of operations between page table snapshots

[src]

the maximum length of a cached page fragment chain

[src]

the maximum length of a cached page fragment chain

[src]

the proportion of remaining valid pages in the segment

[src]

the proportion of remaining valid pages in the segment

[src]

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

[src]

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

[src]

disabling of the log segment copy cleaner

[src]

disabling of the log segment copy cleaner

[src]

the file segment selection mode

[src]

the file segment selection mode

[src]

snapshot file location

[src]

snapshot file location

Trait Implementations

impl Default for ConfigBuilder
[src]

[src]

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

impl Send for ConfigBuilder
[src]

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

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Clone for ConfigBuilder
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<ConfigBuilder> for ConfigBuilder
[src]

[src]

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

[src]

This method tests for !=.

impl Serialize for ConfigBuilder
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl Debug for ConfigBuilder
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Sync for ConfigBuilder