pub struct Mvcc {
pub db_path: PathBuf,
pub rw: PageRW,
pub reader_tsns: Arc<ReaderTsnRegistry>,
pub page_size: usize,
pub max_node_size: usize,
pub verbose: bool,
pub zero_fill_pages: bool,
/* private fields */
}Fields§
§db_path: PathBuf§rw: PageRW§reader_tsns: Arc<ReaderTsnRegistry>§page_size: usize§max_node_size: usize§verbose: bool§zero_fill_pages: boolImplementations§
Source§impl Mvcc
impl Mvcc
pub fn new(verbose: bool, options: StorageOptions) -> Result<Mvcc, DcbError>
pub fn get_latest_header_page(&self) -> Result<Arc<Page>, DcbError>
pub fn pin_header(&self, page: Arc<Page>)
pub fn read_header(&self, page_id: PageID) -> Result<Arc<Page>, DcbError>
pub fn read_page(&self, page_id: PageID) -> Result<Arc<Page>, DcbError>
pub fn reader(&self) -> Result<Reader, DcbError>
pub fn writer(&self) -> Result<Writer, DcbError>
Sourcepub fn write_pages<'a, I>(
&self,
pages: I,
writer_buffer: &mut Vec<u8>,
) -> Result<usize, DcbError>where
I: IntoIterator<Item = &'a Page>,
pub fn write_pages<'a, I>(
&self,
pages: I,
writer_buffer: &mut Vec<u8>,
) -> Result<usize, DcbError>where
I: IntoIterator<Item = &'a Page>,
Extracts contiguous runs of pages and writes them to disk in batches. Returns the number of pages written.
pub fn commit(&self, writer: &mut Writer) -> Result<(), DcbError>
pub fn prepare_commit<T>(
&self,
writer: &mut Writer,
mvcc: &T,
) -> Result<(PreparedCommit, HashMap<PageID, Arc<Page>, FxBuildHasher>, Arc<Page>), DcbError>where
T: MvccSnapshot,
pub fn update_page_cache( &self, wet_pages: HashMap<PageID, Arc<Page>, FxBuildHasher>, ) -> Result<(), DcbError>
pub fn fsync(&self) -> Result<(), DcbError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Mvcc
impl !RefUnwindSafe for Mvcc
impl !UnwindSafe for Mvcc
impl Forget for Mvcc
impl Move for Mvcc
impl Send for Mvcc
impl Sync for Mvcc
impl Unpin for Mvcc
impl UnsafeUnpin for Mvcc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request