Skip to main content

LockManager

Struct LockManager 

Source
pub struct LockManager { /* private fields */ }

Implementations§

Source§

impl LockManager

Source

pub fn new() -> Self

Create a new lock manager.

Source

pub fn default_instance() -> Self

Create a lock manager using default configuration.

Source

pub fn lock_table( &self, txn: &Transaction, mode: LockMode, table_ref: TableReference, ) -> bool

Acquire a table level lock for the given transaction.

Source

pub fn unlock_table(&self, txn: &Transaction, table_ref: TableReference) -> bool

Release a table level lock held by the transaction.

Source

pub fn lock_row( &self, txn: &Transaction, mode: LockMode, table_ref: TableReference, rid: RecordId, ) -> bool

Acquire a row level lock for the given transaction.

Source

pub fn unlock_row( &self, txn: &Transaction, table_ref: TableReference, rid: RecordId, _force: bool, ) -> bool

Release a row level lock held by the transaction.

Source

pub fn unlock_table_raw( &self, txn_id: TransactionId, table_ref: TableReference, ) -> bool

Source

pub fn unlock_row_raw( &self, txn_id: TransactionId, table_ref: TableReference, rid: RecordId, ) -> bool

Source

pub fn unlock_all(&self)

Force release of all locks (used during shutdown/testing).

Source

pub fn debug_snapshot(&self) -> LockDebugSnapshot

Trait Implementations§

Source§

impl Debug for LockManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LockManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.