[−][src]Struct pagecache::Reservation
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]
pub fn abort(self) -> Result<(Lsn, DiskPtr)>
[src]
Cancel the reservation, placing a failed flush on disk, returning the (cancelled) log sequence number and file offset.
pub fn complete(self) -> Result<(Lsn, DiskPtr)>
[src]
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]
Get the log file offset for reading this buffer in the future.
pub fn lsn(&self) -> Lsn
[src]
Get the log sequence number for this update.
pub fn ptr(&self) -> DiskPtr
[src]
Get the underlying storage location for the written value. Note that an blob write still has a pointer in the log at the provided lid location.
pub fn reservation_len(&self) -> usize
[src]
Returns the length of the on-log reservation.
Trait Implementations
impl<'a> Drop for Reservation<'a>
[src]
Auto Trait Implementations
impl<'a> Sync for Reservation<'a>
impl<'a> Unpin for Reservation<'a>
impl<'a> Send for Reservation<'a>
impl<'a> !UnwindSafe for Reservation<'a>
impl<'a> !RefUnwindSafe for Reservation<'a>
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,