pub struct V2LockManager { /* private fields */ }Expand description
Lock manager for V2 resources
Implementations§
Source§impl V2LockManager
impl V2LockManager
Sourcepub fn new(deadlock_detector: Arc<DeadlockDetector>) -> Self
pub fn new(deadlock_detector: Arc<DeadlockDetector>) -> Self
Create new lock manager
Sourcepub fn acquire_lock(
&self,
tx_id: TransactionId,
resource_id: ResourceId,
lock_type: LockType,
) -> NativeResult<bool>
pub fn acquire_lock( &self, tx_id: TransactionId, resource_id: ResourceId, lock_type: LockType, ) -> NativeResult<bool>
Acquire lock for transaction
Sourcepub fn release_lock(
&self,
tx_id: TransactionId,
resource_id: ResourceId,
) -> NativeResult<()>
pub fn release_lock( &self, tx_id: TransactionId, resource_id: ResourceId, ) -> NativeResult<()>
Release lock for transaction
Sourcepub fn add_to_wait_queue(&self, request: LockRequest) -> NativeResult<()>
pub fn add_to_wait_queue(&self, request: LockRequest) -> NativeResult<()>
Add lock request to wait queue
Sourcepub fn process_wait_queue(&self) -> NativeResult<()>
pub fn process_wait_queue(&self) -> NativeResult<()>
Process waiting queue
Auto Trait Implementations§
impl Freeze for V2LockManager
impl !RefUnwindSafe for V2LockManager
impl Send for V2LockManager
impl Sync for V2LockManager
impl Unpin for V2LockManager
impl !UnwindSafe for V2LockManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more