pub struct ConfigBuilder { /* fields omitted */ }
Top-level configuration for the system.
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);
let _config = pagecache::ConfigBuilder::default()
.path("/path/to/data".to_owned())
.read_only(true);
Returns a default ConfigBuilder
Set the path of the database (builder).
Set the merge operator that can be relied on during merges in
the PageCache
.
Finalize the configuration.
This function will panic if it is not possible
to open the files for performing database IO,
or if the provided configuration fails some
basic sanity checks.
size of each io flush buffer. MUST be multiple of 512!
b-link tree node size in bytes before splitting
page consolidation threshold
deletes the database after drop. if no path is set, uses /dev/shm on linux
whether to run in read-only mode
log base 2 of the number of cache shards
maximum size for the system page cache
whether to use zstd compression
the compression factor to use with zstd compression
number of ms between IO buffer flushes
number of operations between page table snapshots
the proportion of remaining valid pages in the segment
the cleanup threshold skew in percentage points between the first and last segments
the file segment selection mode
print a performance profile when the Config is dropped
generated IDs are persisted at this interval. during recovery we skip twice this number
perform IO operations on a threadpool
set the number of threads in the IO threadpool. defaults to # logical CPUs.
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more
Returns the "default value" for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static