pub struct Mvcc {
pub pager: Pager,
pub reader_tsns: Arc<ReaderTsnRegistry>,
pub writer_lock: Mutex<()>,
pub page_size: usize,
pub max_node_size: usize,
pub headers: Mutex<Vec<Page>>,
pub header_page_buf: Mutex<Vec<u8>>,
pub page_buf: Mutex<Vec<u8>>,
pub verbose: bool,
pub zero_fill_pages: bool,
/* private fields */
}Fields§
§pager: Pager§reader_tsns: Arc<ReaderTsnRegistry>§writer_lock: Mutex<()>§page_size: usize§max_node_size: usize§headers: Mutex<Vec<Page>>§header_page_buf: Mutex<Vec<u8>>§page_buf: Mutex<Vec<u8>>§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 read_page(&self, page_id: PageID) -> Result<Arc<Page>, DcbError>
pub fn fsync(&self) -> Result<(), DcbError>
pub fn reader(&self) -> Result<Reader, DcbError>
pub fn writer(&self) -> Result<Writer, DcbError>
Sourcepub fn write_pages<'a, I>(&self, pages: I) -> Result<usize, DcbError>where
I: IntoIterator<Item = &'a Page>,
pub fn write_pages<'a, I>(&self, pages: I) -> Result<usize, DcbError>where
I: IntoIterator<Item = &'a Page>,
Write one or more pages to disk using the shared preallocated page buffer. Returns the number of pages written.
pub fn commit(&self, writer: &mut Writer) -> Result<(), DcbError>
Auto Trait Implementations§
impl !Freeze for Mvcc
impl !RefUnwindSafe for Mvcc
impl !UnwindSafe 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