[][src]Struct pagecache::logger::Log

pub struct Log { /* fields omitted */ }

A sequential store which allows users to create reservations placed at known log offsets, used for writing persistent data structures that need to know where to find persisted bits in the future.

Methods

impl Log[src]

pub fn start(config: Config, snapshot: Snapshot) -> Result<Self>[src]

Start the log, open or create the configured file, and optionally start the periodic buffer flush thread.

pub fn start_raw_log(config: Config) -> Result<Self>[src]

Starts a log for use without a materializer.

pub fn flush(&self) -> Result<usize>[src]

Flushes any pending IO buffers to disk to ensure durability. Returns the number of bytes written during this call.

pub fn iter_from(&self, lsn: Lsn) -> LogIter[src]

Return an iterator over the log, starting with a specified offset.

pub fn read(&self, pid: PageId, lsn: Lsn, ptr: DiskPtr) -> Result<LogRead>[src]

read a buffer from the disk

pub fn stable_offset(&self) -> Lsn[src]

returns the current stable offset written to disk

pub fn make_stable(&self, lsn: Lsn) -> Result<usize>[src]

blocks until the specified log sequence number has been made stable on disk. Returns the number of bytes written during this call.

pub fn reserve(
    &self,
    log_kind: LogKind,
    pid: PageId,
    raw_buf: &[u8]
) -> Result<Reservation>
[src]

Tries to claim a reservation for writing a buffer to a particular location in stable storge, which may either be completed or aborted later. Useful for maintaining linearizability across CAS operations that may need to persist part of their operation.

Trait Implementations

impl Drop for Log[src]

impl Send for Log[src]

impl Debug for Log[src]

Auto Trait Implementations

impl Unpin for Log

impl Sync for Log

impl !RefUnwindSafe for Log

impl !UnwindSafe for Log

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]