Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
|
A database that is backed by one contiguous file. More...
#include <datastore.h>
Public Member Functions | |
FileDataStore (const char *filename, const PercyServerParams *params, dboffset_t offset=0) | |
Constructor. More... | |
virtual | ~FileDataStore () |
Destructor. More... | |
Public Member Functions inherited from DataStore | |
DataStore (unsigned char *database, const PercyServerParams *params) | |
Constructor. More... | |
virtual | ~DataStore () |
Destructor. More... | |
const unsigned char * | get_data () const |
Get a pointer to the database in memory. More... | |
void | set_database (unsigned char *data=NULL) |
Change the database pointer. More... | |
vector< DataStore * > | get_worker_datastores () const |
Get the database objects for the threads/workers. More... | |
DataStore * | get_worker_datastore (nservers_t worker_index) const |
Get the database object for a thread/worker. More... | |
Additional Inherited Members | |
Protected Attributes inherited from DataStore | |
const PercyServerParams * | serverparams |
Parameters for the server. More... | |
const PercyParams * | params |
Parameters for the protocol. More... | |
dbsize_t | block_size |
Size of each database block in bytes. More... | |
dbsize_t | num_blocks |
Number of blocks in the database. More... | |
dbsize_t | database_size |
Total size of the database in bytes. More... | |
nservers_t | num_workers |
Number of threads/workers. More... | |
std::vector< dbsize_t > | subdb_offsets |
The distance from the beginning of the database that each thread/worker's portion of the database begins. More... | |
std::vector< DataStore * > | subdatastores |
The database objects for the threads/workers. More... | |
A database that is backed by one contiguous file.
FileDataStore | ( | const char * | filename, |
const PercyServerParams * | params, | ||
dboffset_t | offset = 0 |
||
) |
Constructor.
filename | The name of the database file. |
params | The server parameters. |
offset | The distance from the beginning of the file to the start of the database. (Default: 0) |
|
virtual |
Destructor.