pub struct CheckpointLocks { /* private fields */ }Expand description
A table of checkpoint locks indexed by key hash.
This provides a fixed-size array of locks that can be used to protect records during checkpoint operations. The lock for a particular key is determined by hashing the key and using the hash to index into the table.
Implementations§
Source§impl CheckpointLocks
impl CheckpointLocks
Sourcepub fn initialize(&mut self, size: u64)
pub fn initialize(&mut self, size: u64)
Sourcepub fn with_size(size: u64) -> Self
pub fn with_size(size: u64) -> Self
Create and initialize a checkpoint locks table with the given size.
Sourcepub fn get_lock(&self, hash: KeyHash) -> &AtomicCheckpointLock
pub fn get_lock(&self, hash: KeyHash) -> &AtomicCheckpointLock
Sourcepub fn get_lock_by_hash(&self, hash: u64) -> &AtomicCheckpointLock
pub fn get_lock_by_hash(&self, hash: u64) -> &AtomicCheckpointLock
Get the lock for a given raw hash value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointLocks
impl RefUnwindSafe for CheckpointLocks
impl Send for CheckpointLocks
impl Sync for CheckpointLocks
impl Unpin for CheckpointLocks
impl UnwindSafe for CheckpointLocks
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