pub struct LockManager { /* private fields */ }Implementations§
Source§impl LockManager
impl LockManager
Sourcepub fn default_instance() -> Self
pub fn default_instance() -> Self
Create a lock manager using default configuration.
Sourcepub fn lock_table(
&self,
txn: &Transaction,
mode: LockMode,
table_ref: TableReference,
) -> bool
pub fn lock_table( &self, txn: &Transaction, mode: LockMode, table_ref: TableReference, ) -> bool
Acquire a table level lock for the given transaction.
Sourcepub fn unlock_table(&self, txn: &Transaction, table_ref: TableReference) -> bool
pub fn unlock_table(&self, txn: &Transaction, table_ref: TableReference) -> bool
Release a table level lock held by the transaction.
Sourcepub fn lock_row(
&self,
txn: &Transaction,
mode: LockMode,
table_ref: TableReference,
rid: RecordId,
) -> bool
pub fn lock_row( &self, txn: &Transaction, mode: LockMode, table_ref: TableReference, rid: RecordId, ) -> bool
Acquire a row level lock for the given transaction.
Sourcepub fn unlock_row(
&self,
txn: &Transaction,
table_ref: TableReference,
rid: RecordId,
_force: bool,
) -> bool
pub fn unlock_row( &self, txn: &Transaction, table_ref: TableReference, rid: RecordId, _force: bool, ) -> bool
Release a row level lock held by the transaction.
pub fn unlock_table_raw( &self, txn_id: TransactionId, table_ref: TableReference, ) -> bool
pub fn unlock_row_raw( &self, txn_id: TransactionId, table_ref: TableReference, rid: RecordId, ) -> bool
Sourcepub fn unlock_all(&self)
pub fn unlock_all(&self)
Force release of all locks (used during shutdown/testing).
pub fn debug_snapshot(&self) -> LockDebugSnapshot
Trait Implementations§
Source§impl Debug for LockManager
impl Debug for LockManager
Auto Trait Implementations§
impl !Freeze for LockManager
impl !RefUnwindSafe for LockManager
impl Send for LockManager
impl Sync for LockManager
impl Unpin for LockManager
impl UnsafeUnpin for LockManager
impl !UnwindSafe for LockManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more