Trait rsdb::Materializer [] [src]

pub trait Materializer {
    type MaterializedPage;
    type PartialPage;
    type Recovery;
    fn materialize(&self, _: &[Self::PartialPage]) -> Self::MaterializedPage;
fn consolidate(&self, _: &[Self::PartialPage]) -> Vec<Self::PartialPage>;
fn recover(&self, _: &Self::PartialPage) -> Option<Self::Recovery>; }

A user of a PageCache needs to provide a Materializer which handles the merging of page fragments.

Associated Types

The "complete" page, returned to clients who want to retrieve the logical page state.

The "partial" page, written to log storage sequentially, and read in parallel from multiple locations on disk when serving a request to read the page.

The state returned by a call to PageCache::recover, as described by Materializer::recover

Required Methods

Used to generate the result of get requests on the PageCache

Used to compress long chains of partial pages into a condensed form during compaction.

Used to feed custom recovery information back to a higher-level abstraction during startup. For example, a B-Link tree must know what the current root node is before it can start serving requests.

Implementors