|
QDP++
|
DB Base class. More...
#include <qdp_db_imp.h>
Public Member Functions | |
| BinaryStoreDB () | |
| ~BinaryStoreDB () | |
| virtual void | setCacheSize (const unsigned int size) |
| virtual void | setCacheSizeMB (const unsigned int size) |
| virtual void | setPageSize (const unsigned int size) |
| virtual void | setNumberBuckets (const unsigned int num) |
| virtual void | enablePageMove (void) |
| virtual void | disablePageMove (void) |
| virtual void | setMaxUserInfoLen (unsigned int len) |
| virtual unsigned int | getMaxUserInfoLen (void) const |
| virtual void | setMaxNumberConfigs (unsigned int num) |
| virtual unsigned int | getMaxNumberConfigs (void) const |
| virtual bool | fileExists (const std::string &file) const |
| virtual void | open (const std::string &file, int open_flags, int mode) |
| virtual void | close (void) |
| bool | exist (const K &key) |
| void | insert (const K &key, const D &data) |
| void | insertBinary (const std::string &key, const std::string &data) |
| int | get (const K &key, D &data) |
| int | getBinary (const std::string &key, std::string &data) |
| virtual void | keys (std::vector< K > &keys_) |
| virtual void | keysAndData (std::vector< K > &keys_, std::vector< D > &values_) |
| virtual void | binaryKeysAndData (std::vector< std::string > keys_, std::vector< std::string > values_) |
| virtual void | flush (void) |
| virtual std::string | storageName (void) const |
| virtual void | insertUserdata (const std::string &user_data) |
| virtual void | getUserdata (std::string &user_data) |
| BinaryStoreDB () | |
| virtual | ~BinaryStoreDB () |
| virtual void | setCacheSize (const unsigned int size) |
| virtual void | setCacheSizeMB (const unsigned int size) |
| virtual void | setPageSize (const unsigned int size) |
| virtual void | setNumberBuckets (const unsigned int num) |
| virtual void | enablePageMove (void) |
| virtual void | disablePageMove (void) |
| virtual void | setMaxUserInfoLen (unsigned int len) |
| virtual unsigned int | getMaxUserInfoLen (void) const |
| virtual void | setMaxNumberConfigs (unsigned int num) |
| virtual unsigned int | getMaxNumberConfigs (void) const |
| virtual bool | fileExists (const std::string &file) const |
| virtual void | open (const std::string &file, int open_flags, int mode) |
| virtual void | close (void) |
| bool | exist (const K &key) |
| void | insert (const K &key, const D &data) |
| void | insertBinary (const std::string &key, const std::string &data) |
| int | get (K &key, D &data) |
| int | getBinary (std::string &key, std::string &data) |
| virtual void | keys (std::vector< K > &keys_) |
| virtual void | keysAndData (std::vector< K > &keys_, std::vector< D > &values_) |
| virtual void | binaryKeysAndData (std::vector< std::string > keys_, std::vector< std::string > values_) |
| virtual void | flush (void) |
| virtual std::string | storageName (void) const |
| virtual void | insertUserdata (const std::string &user_data) |
| virtual void | getUserdata (std::string &user_data) |
DB Base class.
This class is used for writing of user data (most usefully measurements) into a DB file with a key/value semantics.
Definition at line 38 of file qdp_db_imp.h.
|
inline |
Empty constructor for a DB
Definition at line 161 of file qdp_db_stub.h.
|
inlinevirtual |
Destroy the object
Definition at line 166 of file qdp_db_stub.h.
|
inlinevirtual |
Return all pairs of keys and data in binary string form
| keys | user supplied empty vector to hold all keys |
| data | user supplied empty vector to hold data |
Definition at line 318 of file qdp_db_stub.h.
|
inlinevirtual |
Definition at line 252 of file qdp_db_stub.h.
|
inlinevirtual |
Definition at line 217 of file qdp_db_stub.h.
|
inlinevirtual |
Set whether to move pages when close to save disk space
This only effective on writable database
Definition at line 215 of file qdp_db_stub.h.
|
inline |
Does this key exist in the store
| key | a key object |
Definition at line 259 of file qdp_db_stub.h.
|
inlinevirtual |
Check if a DB file exists before opening.
Definition at line 237 of file qdp_db_stub.h.
|
inlinevirtual |
Flush database in memory to disk
Definition at line 325 of file qdp_db_stub.h.
|
inlinevirtual |
Definition at line 232 of file qdp_db_stub.h.
|
inlinevirtual |
Definition at line 225 of file qdp_db_stub.h.
|
inlinevirtual |
Get user user data from the metadata database
| user_data | user supplied buffer to store user data |
Definition at line 349 of file qdp_db_stub.h.
|
inline |
Insert a pair of data and key into the database data is not ensemble, but a vector of complex.
| key | a key |
| data | a user provided data |
Definition at line 269 of file qdp_db_stub.h.
|
inline |
Insert a pair of data and key into the database in string format
| key | a key |
| data | a user provided data |
Definition at line 278 of file qdp_db_stub.h.
|
inlinevirtual |
Insert user data into the metadata database
| user_data | user supplied data |
Definition at line 341 of file qdp_db_stub.h.
|
inlinevirtual |
Return all available keys to user
| keys | user suppled an empty vector which is populated by keys after this call. |
Definition at line 302 of file qdp_db_stub.h.
|
inlinevirtual |
Return all pairs of keys and data
| keys | user supplied empty vector to hold all keys |
| data | user supplied empty vector to hold data |
Definition at line 310 of file qdp_db_stub.h.
|
inlinevirtual |
Open
| file | filename holding all data and keys |
| open_flags | can be regular UNIX file open flags such as: O_RDONLY, O_RDWR, O_TRUNC |
| mode | regular unix file mode |
Definition at line 250 of file qdp_db_stub.h.
|
inlinevirtual |
How much data and keys should be kept in memory in bytes
o * This should be called before the open is called
| max_cache_size | number of bytes of data and keys should be kept in memory |
Definition at line 175 of file qdp_db_stub.h.
|
inlinevirtual |
How much data and keys should be kept in memory in megabytes
This should be called before the open is called
| max_cache_size | number of bytes of data and keys should be kept in memory |
Definition at line 184 of file qdp_db_stub.h.
|
inlinevirtual |
Set and get maximum number of configurations
Definition at line 230 of file qdp_db_stub.h.
|
inlinevirtual |
Set and get maximum user information length
Definition at line 223 of file qdp_db_stub.h.
|
inlinevirtual |
Set initial number of buckets
This should be called before the open is called
| num | the number of buckets should be used |
Definition at line 206 of file qdp_db_stub.h.
|
inlinevirtual |
Page size used when a new data based is created This only effects a new database
| pagesize | the pagesize used in hash database. This value should be power of 2. The minimum value is 512 and maximum value is 262144 |
Definition at line 195 of file qdp_db_stub.h.
|
inlinevirtual |
Name of database associated with this Data store
Definition at line 332 of file qdp_db_stub.h.