#include <Keyfile.hpp>
Public Types | |
enum | access_mode { random, sequential } |
Random or sequential access b-tree. More... | |
Public Methods | |
void | put (const char *key, const void *value, int valueSize) |
void | put (int key, const void *value, int valueSize) |
bool | get (const char *key, void *value, int &actualSize, int maxSize) |
bool | get (const char *key, char **value, int &actualSize) |
bool | get (int key, void *value, int &actualSize, int maxSize) |
bool | get (int key, char **value, int &actualSize) |
int | getSize (const char *key) |
int | getSize (int key) |
void | remove (const char *key) |
Remove the entry in the b-tree for the given key. | |
void | remove (int key) |
Remove the entry in the b-tree for the given key. | |
void | open (const std::string &filename, access_mode mode, int cacheSize=1024 *1024) |
void | open (const char *filename, access_mode mode, int cacheSize=1024 *1024) |
void | create (const std::string &filename, access_mode mode, int cacheSize=1024 *1024) |
void | create (const char *filename, access_mode mode, int cacheSize=1024 *1024) |
void | close () |
Close a keyfile. | |
Private Methods | |
void | _buildHandle (int cacheSize) |
void | _createKey (char *keyBuf, int number) |
int | _decodeKey (char *keyBuf) |
Private Attributes | |
std::auto_ptr< char > | _handle |
int | _handleSize |
|
Random or sequential access b-tree.
|
|
|
|
|
|
|
|
Close a keyfile.
|
|
Create a keyfile with the given filename, with access_mode of random or sequential, and cacheSize (default 1MB). |
|
Createa keyfile with the given filename, with access_mode of random or sequential, and cacheSize (default 1MB). |
|
Retrieve the value in the b-tree for the given key. Returns false if key does not exist in the b-tree. |
|
Retrieve the value in the b-tree for the given key. Returns false if key does not exist in the b-tree. |
|
Retrieve the value in the b-tree for the given key. Returns false if key does not exist in the b-tree. |
|
Retrieve the value in the b-tree for the given key. Returns false if key does not exist in the b-tree. |
|
Return the size of the data in the b-tree for the given key. Returns -1 if key does not exist in the b-tree. |
|
Return the size of the data in the b-tree for the given key. Returns -1 if key does not exist in the b-tree. |
|
Open a keyfile with the given filename, with access_mode of random or sequential, and cacheSize (default 1MB). |
|
Open a keyfile with the given filename, with access_mode of random or sequential, and cacheSize (default 1MB). |
|
Insert value into b-tree for the given key. Throws an Exception if the operation fails. |
|
Insert value into b-tree for the given key. Throws an Exception if the operation fails. |
|
Remove the entry in the b-tree for the given key.
|
|
Remove the entry in the b-tree for the given key.
|
|
|
|
|