Struct rustdb::pstore::SharedPagedData
source · [−]pub struct SharedPagedData {
pub file: RwLock<CompactFile>,
pub sp_size: usize,
pub ep_size: usize,
pub stash: Mutex<Stash>,
}
Expand description
Allows logical database pages to be shared to allow concurrent readers.
Fields
file: RwLock<CompactFile>
Underlying file.
sp_size: usize
Starter page size.
ep_size: usize
Extension page size.
stash: Mutex<Stash>
Stash of pages.
Implementations
sourcepub fn new(file: Box<dyn Storage>) -> Self
pub fn new(file: Box<dyn Storage>) -> Self
Construct SharedPageData based on specified underlying storage.
sourcepub fn page_size_max(&self) -> usize
pub fn page_size_max(&self) -> usize
Calculate the maximum size of a logical page. This value is stored in the Database struct.
sourcepub fn trim_cache(&self)
pub fn trim_cache(&self)
Trim cache.
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more