Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <buffer_manager.hpp>
Public Member Functions | |
bool | pageReplacement () |
int | count () const |
void | print () const |
BufferObject * | getPages (std::string, std::string) |
Static Public Member Functions | |
static BufferManager * | getInstance () |
Get instance of BufferManager -> singleton pattern. | |
Private Member Functions | |
BufferManager () | |
Private constructor for singleton pattern. | |
BufferObject * | createPage (std::string, std::string, int) |
Load page from HDD. | |
Private Attributes | |
unsigned int | _maxSize |
std::set< BuffObjPtr > | _pages |
Static Private Attributes | |
static BufferManager * | _instance = NULL |
CoGaDB::BufferManager::BufferManager | ( | ) | [private] |
Private constructor for singleton pattern.
References _maxSize, _pages, and MAX_PAGES.
Referenced by getInstance().
int CoGaDB::BufferManager::count | ( | ) | const |
References _pages.
BufferObject * CoGaDB::BufferManager::createPage | ( | std::string | table, |
std::string | col, | ||
int | offset | ||
) | [private] |
Load page from HDD.
References _maxSize, _pages, pageReplacement(), and CoGaDB::BufferObject::setNext().
Referenced by getPages().
BufferManager * CoGaDB::BufferManager::getInstance | ( | ) | [static] |
Get instance of BufferManager -> singleton pattern.
References _instance, and BufferManager().
Referenced by CoGaDB::RowTable::load().
BufferObject * CoGaDB::BufferManager::getPages | ( | std::string | table, |
std::string | col | ||
) |
References _pages, createPage(), and CoGaDB::BufferObject::prev().
Referenced by CoGaDB::RowTable::load().
void CoGaDB::BufferManager::print | ( | ) | const |
References _pages.
BufferManager * CoGaDB::BufferManager::_instance = NULL [static, private] |
Referenced by getInstance().
unsigned int CoGaDB::BufferManager::_maxSize [private] |
Referenced by BufferManager(), and createPage().
std::set<BuffObjPtr> CoGaDB::BufferManager::_pages [private] |
B+ tree structure for fast access
Referenced by BufferManager(), count(), createPage(), getPages(), and print().