Skip to main content

TxManager

Struct TxManager 

Source
pub struct TxManager<S: WriteSetApplicator> { /* private fields */ }

Implementations§

Source§

impl<S: WriteSetApplicator> TxManager<S>

Source

pub fn new(store: S) -> Self

Source

pub fn new_with_counters( store: S, next_tx: TxId, next_lsn: u64, committed_watermark: TxId, ) -> Self

Source

pub fn begin(&self) -> TxId

Source

pub fn snapshot(&self) -> SnapshotId

Source

pub fn with_write_set<F, R>(&self, tx: TxId, f: F) -> Result<R>
where F: FnOnce(&mut WriteSet) -> R,

Source

pub fn cloned_write_set(&self, tx: TxId) -> Result<WriteSet>

Source

pub fn commit(&self, tx: TxId) -> Result<()>

Source

pub fn commit_with_lsn(&self, tx: TxId) -> Result<u64>

Source

pub fn rollback(&self, tx: TxId) -> Result<()>

Source

pub fn store(&self) -> &S

Source

pub fn new_row_id(&self) -> RowId

Source

pub fn current_lsn(&self) -> u64

Source

pub fn allocate_ddl_lsn<F, R>(&self, f: F) -> R
where F: FnOnce(u64) -> R,

Source

pub fn with_commit_lock<F, R>(&self, f: F) -> R
where F: FnOnce() -> R,

Trait Implementations§

Auto Trait Implementations§

§

impl<S> !Freeze for TxManager<S>

§

impl<S> !RefUnwindSafe for TxManager<S>

§

impl<S> Send for TxManager<S>

§

impl<S> Sync for TxManager<S>

§

impl<S> Unpin for TxManager<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for TxManager<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for TxManager<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.