pub struct ConcurrentStatus {
pub hold_pages: ConcurrentHashMap<Transaction, HashSet<BTreePageID>>,
/* private fields */
}Expand description
reference:
- https://sourcegraph.com/github.com/XiaochenCui/small-db-hw@87607789b677d6afee00a223eacb4f441bd4ae87/-/blob/src/java/smalldb/ConcurrentStatus.java?L12:14&subtree=true
Fields§
§hold_pages: ConcurrentHashMap<Transaction, HashSet<BTreePageID>>Implementations§
Source§impl ConcurrentStatus
impl ConcurrentStatus
pub fn new() -> Self
pub fn request_lock( &self, tx: &Transaction, lock: &Lock, page_id: &BTreePageID, ) -> Result<(), SmallError>
pub fn release_lock_by_tx(&self, tx: &Transaction) -> SmallResult
pub fn holds_lock(&self, tx: &Transaction, page_id: &BTreePageID) -> bool
pub fn get_page_tx(&self, page_id: &BTreePageID) -> Option<Transaction>
pub fn clear(&self)
Trait Implementations§
Source§impl Debug for ConcurrentStatus
impl Debug for ConcurrentStatus
Auto Trait Implementations§
impl Freeze for ConcurrentStatus
impl RefUnwindSafe for ConcurrentStatus
impl Send for ConcurrentStatus
impl Sync for ConcurrentStatus
impl Unpin for ConcurrentStatus
impl UnwindSafe for ConcurrentStatus
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