pub struct SWMRLockManager { /* private fields */ }Expand description
SWMR lock manager for SiftDB collections
Implementations§
Source§impl SWMRLockManager
impl SWMRLockManager
pub fn new(collection_path: &Path) -> Self
Sourcepub fn acquire_read_lock(
&self,
timeout_secs: u64,
holder_info: String,
) -> Result<ReadLock<'_>>
pub fn acquire_read_lock( &self, timeout_secs: u64, holder_info: String, ) -> Result<ReadLock<'_>>
Acquire a read lock
Sourcepub fn acquire_write_lock(
&self,
timeout_secs: u64,
holder_info: String,
) -> Result<WriteLock<'_>>
pub fn acquire_write_lock( &self, timeout_secs: u64, holder_info: String, ) -> Result<WriteLock<'_>>
Acquire a write lock
Sourcepub fn is_write_locked(&self) -> Result<bool>
pub fn is_write_locked(&self) -> Result<bool>
Check if collection is currently locked for writing
Sourcepub fn active_read_lock_count(&self) -> Result<usize>
pub fn active_read_lock_count(&self) -> Result<usize>
Get count of active read locks
Auto Trait Implementations§
impl Freeze for SWMRLockManager
impl RefUnwindSafe for SWMRLockManager
impl Send for SWMRLockManager
impl Sync for SWMRLockManager
impl Unpin for SWMRLockManager
impl UnwindSafe for SWMRLockManager
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