Struct rustdb::pstore::Stash [−][src]
pub struct Stash {
pub time: u64,
pub pages: HashMap<u64, PageInfoPtr>,
pub readers: BTreeMap<u64, usize>,
pub updates: BTreeMap<u64, HashSet<u64>>,
}
Expand description
Central store of data.
Fields
time: u64
Write time - number of writes.
pages: HashMap<u64, PageInfoPtr>
Page number -> page info.
readers: BTreeMap<u64, usize>
Time -> reader count.
updates: BTreeMap<u64, HashSet<u64>>
Time -> set of page numbers.
Implementations
Set the value of the specified page for the current time.
Get the PageInfoPtr for the specified page.
Register that there is a client reading the database. The result is the current time.
Register that the read at the specified time has ended. Stashed pages may be freed.