smollerGraph 0.20.2
A small graph database, from scratch
Loading...
Searching...
No Matches
smollergraph::PageHandle Class Reference

A page pinned in a buffer pool. More...

#include <buffer_pool.h>

Public Member Functions

 PageHandle (BufferPool &pool, size_t frame)
 
 ~PageHandle ()
 
 PageHandle (const PageHandle &)=delete
 
PageHandle & operator= (const PageHandle &)=delete
 
const Page & read () const
 The page, to read.
 
Page & write ()
 The page, to change, which marks it to be written back to the file.
 

Detailed Description

A page pinned in a buffer pool.

The pool doesn't evict a pinned page, and the handle unpins it when it goes away.

Definition at line 17 of file buffer_pool.h.

Constructor & Destructor Documentation

◆ PageHandle() [1/2]

smollergraph::PageHandle::PageHandle ( BufferPool &  pool,
size_t  frame 
)
inline

Definition at line 19 of file buffer_pool.h.

◆ ~PageHandle()

smollergraph::PageHandle::~PageHandle ( )

Definition at line 8 of file buffer_pool.cc.

◆ PageHandle() [2/2]

smollergraph::PageHandle::PageHandle ( const PageHandle &  )
delete

Member Function Documentation

◆ operator=()

PageHandle & smollergraph::PageHandle::operator= ( const PageHandle &  )
delete

◆ read()

const Page & smollergraph::PageHandle::read ( ) const

The page, to read.

Definition at line 10 of file buffer_pool.cc.

◆ write()

Page & smollergraph::PageHandle::write ( )

The page, to change, which marks it to be written back to the file.

Definition at line 12 of file buffer_pool.cc.


The documentation for this class was generated from the following files: