[][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<R>(config: Config, snapshot: Snapshot<R>) -> Result<Log, ()>
[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<Log, ()>
[src]

Starts a log for use without a materializer.

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

Flushes any pending IO buffers to disk to ensure durability.

pub fn reserve(&self, buf: Vec<u8>) -> Result<Reservation, ()>
[src]

Reserve space in the log for a pending linearized operation.

pub fn write(&self, buf: Vec<u8>) -> Result<(Lsn, DiskPtr), ()>
[src]

Write a buffer into the log. Returns the log sequence number and the file offset of the write.

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

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

pub fn read(&self, 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<(), ()>
[src]

blocks until the specified log sequence number has been made stable on disk

Trait Implementations

impl Send for Log
[src]

Auto Trait Implementations

impl Sync for Log

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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