class FileDataStore : public DataStore

Class that store data in file system

Inheritance:


Public Methods

virtual void addGroup( const string& group ) throw(VException&)
add a new group
FileDataStore( int numBinsP, const string &fileRootP )
virtual string getItem( const string& group, const string& name ) throw(VException&)
get the specified item
virtual int getItemSize( const string& group, const string& name ) throw(VException&)
get the size in bytes of the data in the specified item
virtual TimeStamp getItemTimeStamp( const string& group, const string& name ) throw(VException&)
get the last modification time for the specfied item
virtual bool isGroup( const string& group) throw(VException&)
return true if the group exists
virtual bool isItem( const string& group, const string& name) throw(VException&)
Return true if the specified item exists
virtual StringList listGroups()
get a list of all groups
virtual StringList listItems(const string& group) throw(VException&)
get list of all items in this group
virtual void putItem( const string& group, const string& name, const string& data, TimeStamp timeStamp = 0 ) throw(VException&)
store the data into the specified item, it time is not specifeid, current time is used
virtual void removeGroup( const string& group) throw(VException&)
remove a group
virtual void removeItem( const string& group, const string& name) throw(VException&)
Remove the specified item
virtual ~FileDataStore()

Private Fields

string fileRoot
path to root of file system in use
VRWLock lock
lock to block concurent file access
int numBins
number of directory bins currently in use

Private Methods

string dirName(const string& group, const string& name )
get the full path directoy name for a given group
string dirName(const string& group, int bin )
get the full path directoy name for a given group
string fileName(const string& group, const string& name )
get the full path file name for a given item
string getBin( const string& group, const string& name )
get the bin name for a given item
string getBin( int i )
get the bin name for a particular bin
int hash(const string& group, const string& name )
take stuff and return number from 0 to numBins-1
string rootName( int bin )
get the full path for the root of the data store

Inherited from DataStore:

Protected Fields

const int aproxNumUsers

Documentation

Class that store data in file system
FileDataStore( int numBinsP, const string &fileRootP )

virtual ~FileDataStore()

virtual string getItem( const string& group, const string& name ) throw(VException&)
get the specified item

virtual TimeStamp getItemTimeStamp( const string& group, const string& name ) throw(VException&)
get the last modification time for the specfied item

virtual int getItemSize( const string& group, const string& name ) throw(VException&)
get the size in bytes of the data in the specified item

virtual void putItem( const string& group, const string& name, const string& data, TimeStamp timeStamp = 0 ) throw(VException&)
store the data into the specified item, it time is not specifeid, current time is used

virtual void removeItem( const string& group, const string& name) throw(VException&)
Remove the specified item

virtual bool isItem( const string& group, const string& name) throw(VException&)
Return true if the specified item exists

virtual StringList listItems(const string& group) throw(VException&)
get list of all items in this group

virtual void addGroup( const string& group ) throw(VException&)
add a new group

virtual void removeGroup( const string& group) throw(VException&)
remove a group

virtual bool isGroup( const string& group) throw(VException&)
return true if the group exists

virtual StringList listGroups()
get a list of all groups

string getBin( int i )
get the bin name for a particular bin

string getBin( const string& group, const string& name )
get the bin name for a given item

string rootName( int bin )
get the full path for the root of the data store

string dirName(const string& group, const string& name )
get the full path directoy name for a given group

string dirName(const string& group, int bin )
get the full path directoy name for a given group

string fileName(const string& group, const string& name )
get the full path file name for a given item

int hash(const string& group, const string& name )
take stuff and return number from 0 to numBins-1

string fileRoot
path to root of file system in use

int numBins
number of directory bins currently in use

VRWLock lock
lock to block concurent file access


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++