Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/persistence/buffer_manager.hpp
Go to the documentation of this file.
00001 #pragma once
00002 #include <climits>
00003 #include <set>
00004 #include <persistence/buffer_object.hpp>
00005 #include <core/global_definitions.hpp>
00006 
00007 namespace CoGaDB
00008 {
00009 
00010 #define MAX_PAGES UINT_MAX
00011 
00012 typedef shared_pointer_namespace::shared_ptr<BufferObject> BuffObjPtr;
00013                 
00014 /* BufferManager implementet as Singleton Pattern */
00015 class BufferManager
00016 { 
00017     private:     
00018          static BufferManager* _instance;
00019          unsigned int _maxSize;
00021          std::set<BuffObjPtr> _pages;
00023          BufferManager();
00025          BufferObject* createPage(std::string, std::string, int);        
00026         public:
00028      static BufferManager* getInstance();        
00029          bool pageReplacement();
00030          int count() const;
00031          void print() const;
00032          BufferObject* getPages(std::string, std::string);
00033          
00034 };
00035 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines