A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DatabaseInterface Class Referenceabstract

#include <Database.h>

+ Collaboration diagram for DatabaseInterface:

Public Member Functions

virtual ~DatabaseInterface ()
 
virtual void addType (TypePtr type)=0
 
virtual bool removeType (UserTypeID typeID)=0
 
virtual void dump ()=0
 
virtual DatabaseID getDatabaseID ()=0
 
virtual string getDatabaseName ()=0
 
virtual bool addObject (PDBObjectPtr object, PageID &pageId, MiniPageID &miniPageId)=0
 
virtual PDBObjectPtr getObject (UserTypeID typeID, SetID setID, PageID pageID, MiniPageID miniPageID)=0
 
virtual PDBObjectPtr getObjectByOffset (UserTypeID typeID, SetID setID, PageID pageID, size_t offset)=0
 
virtual PDBPagePtr getPage (UserTypeID typeID, SetID setID, PageID pageID)=0
 
virtual int getNumPages (UserTypeID typeId, SetID setId)=0
 
virtual TypePtr getType (UserTypeID typeId)=0
 
virtual void flush ()=0
 

Detailed Description

This class wraps the interface for implementing a database. A database contains one or more types, and a type contains one or more sets.

Definition at line 34 of file Database.h.

Constructor & Destructor Documentation

virtual DatabaseInterface::~DatabaseInterface ( )
inlinevirtual

Definition at line 39 of file Database.h.

Member Function Documentation

virtual bool DatabaseInterface::addObject ( PDBObjectPtr  object,
PageID pageId,
MiniPageID &  miniPageId 
)
pure virtual

Add a new object to the database. The object contains fields that specifies the type and set. PageId and minipageId will be automatically assigned. Return true if successful, return false if typeId or setId specified in the object doesn't exists.

virtual void DatabaseInterface::addType ( TypePtr  type)
pure virtual

Add a new type to database

virtual void DatabaseInterface::dump ( )
pure virtual

Dump all in-memory data from the database.

virtual void DatabaseInterface::flush ( )
pure virtual

Flush data in input buffer into disk files.

virtual DatabaseID DatabaseInterface::getDatabaseID ( )
pure virtual

Return the DatabaseID of this database.

virtual string DatabaseInterface::getDatabaseName ( )
pure virtual

Return the name of this database.

virtual int DatabaseInterface::getNumPages ( UserTypeID  typeId,
SetID  setId 
)
pure virtual

Get total number of pages in a specified Set.

virtual PDBObjectPtr DatabaseInterface::getObject ( UserTypeID  typeID,
SetID  setID,
PageID  pageID,
MiniPageID  miniPageID 
)
pure virtual

Get an object from the database, miniPageID must be specified instead of offset.

virtual PDBObjectPtr DatabaseInterface::getObjectByOffset ( UserTypeID  typeID,
SetID  setID,
PageID  pageID,
size_t  offset 
)
pure virtual

Get an object from the database, offset must be specified instead of miniPageID.

virtual PDBPagePtr DatabaseInterface::getPage ( UserTypeID  typeID,
SetID  setID,
PageID  pageID 
)
pure virtual

Get a page from the database.

virtual TypePtr DatabaseInterface::getType ( UserTypeID  typeId)
pure virtual

Get a type from the database.

virtual bool DatabaseInterface::removeType ( UserTypeID  typeID)
pure virtual

Remove a type from database, all directories and files associated with the type will be deleted.


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