Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
FileDataStore Class Reference

A database that is backed by one contiguous file. More...

#include <datastore.h>

Inheritance diagram for FileDataStore:
DataStore

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...
 
DataStoreget_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 PercyServerParamsserverparams
 Parameters for the server. More...
 
const PercyParamsparams
 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...
 

Detailed Description

A database that is backed by one contiguous file.

Constructor & Destructor Documentation

FileDataStore ( const char *  filename,
const PercyServerParams params,
dboffset_t  offset = 0 
)

Constructor.

Parameters
filenameThe name of the database file.
paramsThe server parameters.
offsetThe distance from the beginning of the file to the start of the database. (Default: 0)
virtual ~FileDataStore ( )
virtual

Destructor.


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