Struct simple_db_rust::btree::buffer_pool::BufferPool [−][src]
pub struct BufferPool {
pub internal_buffer: HashMap<BTreePageID, Rc<RefCell<BTreeInternalPage>>>,
pub leaf_buffer: HashMap<BTreePageID, Rc<RefCell<BTreeLeafPage>>>,
// some fields omitted
}
Fields
internal_buffer: HashMap<BTreePageID, Rc<RefCell<BTreeInternalPage>>>
leaf_buffer: HashMap<BTreePageID, Rc<RefCell<BTreeLeafPage>>>
Implementations
pub fn get_internal_page(
&mut self,
key: &BTreePageID
) -> Result<Rc<RefCell<BTreeInternalPage>>>
pub fn get_root_pointer_page(
&mut self,
key: &BTreePageID
) -> Result<Rc<RefCell<BTreeRootPointerPage>>>
Add a tuple to the specified table on behalf of transaction tid. Will acquire a write lock on the page the tuple is added to and any other pages that are updated (Lock acquisition is not needed for lab2). May block if the lock(s) cannot be acquired.
Marks any pages that were dirtied by the operation as dirty by calling their markDirty bit, and adds versions of any pages that have been dirtied to the cache (replacing any existing versions of those pages) so that future requests see up-to-date pages.