Struct pagecache::Reservation [−][src]
pub struct Reservation<'a> { /* fields omitted */ }
A pending log reservation which can be aborted or completed.
NB the holder should quickly call complete
or abort
as
taking too long to decide will cause the underlying IO
buffer to become blocked.
Methods
impl<'a> Reservation<'a>
[src]
impl<'a> Reservation<'a>
pub fn abort(self) -> CacheResult<(Lsn, LogID), ()>
[src]
pub fn abort(self) -> CacheResult<(Lsn, LogID), ()>
Cancel the reservation, placing a failed flush on disk, returning the (cancelled) log sequence number and file offset.
pub fn complete(self) -> CacheResult<(Lsn, LogID), ()>
[src]
pub fn complete(self) -> CacheResult<(Lsn, LogID), ()>
Complete the reservation, placing the buffer on disk. returns the log sequence number of the write, and the file offset.
pub fn lid(&self) -> LogID
[src]
pub fn lid(&self) -> LogID
Get the log file offset for reading this buffer in the future.
pub fn lsn(&self) -> Lsn
[src]
pub fn lsn(&self) -> Lsn
Get the log sequence number for this update.
Trait Implementations
impl<'a> Drop for Reservation<'a>
[src]
impl<'a> Drop for Reservation<'a>
Auto Trait Implementations
impl<'a> Send for Reservation<'a>
impl<'a> Send for Reservation<'a>
impl<'a> Sync for Reservation<'a>
impl<'a> Sync for Reservation<'a>