[−][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(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]
&self,
log_kind: LogKind,
pid: PageId,
raw_buf: &[u8]
) -> Result<Reservation>
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
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,