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.
|
#include <Database.h>
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 |
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.
|
inlinevirtual |
Definition at line 39 of file Database.h.
|
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.
|
pure virtual |
Add a new type to database
|
pure virtual |
Dump all in-memory data from the database.
|
pure virtual |
Flush data in input buffer into disk files.
|
pure virtual |
Return the DatabaseID of this database.
|
pure virtual |
Return the name of this database.
|
pure virtual |
Get total number of pages in a specified Set.
|
pure virtual |
Get an object from the database, miniPageID must be specified instead of offset.
|
pure virtual |
Get an object from the database, offset must be specified instead of miniPageID.
|
pure virtual |
Get a page from the database.
|
pure virtual |
Get a type from the database.
|
pure virtual |
Remove a type from database, all directories and files associated with the type will be deleted.