[−][src]Struct pagecache::logger::Log
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,