VOS::FileSystemPersistance Class Reference
#include <fspersist.hh>
Inheritance diagram for VOS::FileSystemPersistance:

Detailed Description
Definition at line 28 of file fspersist.hh.
Public Member Functions
- FileSystemPersistance (const std::string &dbpath)
- virtual void wipeDatabase ()
- virtual void siteExtensionAttachedTo (Site *vb)
- virtual void destroy ()
- virtual void post_createVobject (VobjectState &state, Vobject *requester, VobjectBase *newvobject)
- virtual void post_renameVobject (VobjectState &state, Vobject *requester, const std::string &oldname, const std::string &newname)
- virtual void post_addType (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, const std::string &s)
- virtual void post_removeType (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, const std::string &s)
- virtual void post_insertChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, int position, const std::string &contextual_name, Vobject *child)
- virtual void post_setChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, int position, const std::string &contextual_name, Vobject *child, const std::string &oldcontextual_name, Vobject *oldchild)
- virtual void post_removeChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, ParentChildRelation *pcr, bool strict)
- virtual void post_addToACL (AccessControlState *acs, Vobject *requester, const std::string &ACLname, Vobject *id, const std::string &oldACLname)
- virtual void post_removeFromACL (AccessControlState *acs, Vobject *requester, const std::string &ACLname, Vobject *id)
- virtual void post_deleteACL (AccessControlState *acs, Vobject *requester, const std::string &policies, AccessControlList *oldacl)
- virtual void post_setDefaultPolicy (AccessControlState *acs, Vobject *requester, const std::string &policy, const std::string &oldpolicy)
- virtual void beginTransaction ()
- Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
- Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
- virtual void endTransaction ()
- Commit any blocks saved since the last call to beginTransaction().
- Commit any blocks saved since the last call to beginTransaction().
- virtual bool storeBlock (Vobject *from, const std::string &key, const std::string &data)
- virtual bool getBlock (Vobject *from, const std::string &key, std::string &data)
- virtual bool blockExists (Vobject *from, const std::string &key)
- virtual bool removeBlock (Vobject *from, const std::string &key)
- virtual bool isLoadingDB ()
Protected Member Functions
- virtual void writeTypes (const std::string &dbpath, Vobject *vobj)
- virtual void writeDefaultPolicy (const std::string &dbpath, Vobject *vobj)
- virtual void writeACLs (const std::string &dbpath, Vobject *vobj)
- virtual void writeChildren (const std::string &dbpath, Vobject *vobj)
- virtual void readTypes (const char *dbpath, std::deque< std::string > &types)
- virtual void readDefaultPolicy (const char *dbpath, Vobject *obj)
- virtual void readACLs (const char *dbpath, Vobject *obj)
- virtual void readChildList (const char *dbpath, std::deque< std::pair< std::string, std::string > > &childlist)
Protected Attributes
Constructor & Destructor Documentation
| VOS::FileSystemPersistance::FileSystemPersistance | ( | const std::string & | dbpath | ) |
Member Function Documentation
| virtual void VOS::FileSystemPersistance::beginTransaction | ( | ) | [virtual] |
Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
Not actually implemented with all persistance extensions!
Reimplemented from VOS::Persistance.
| virtual bool VOS::FileSystemPersistance::blockExists | ( | Vobject * | from, | |
| const std::string & | key | |||
| ) | [virtual] |
Test for the existance of a block.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data
- Returns:
- true if key was found, false if not
Implements VOS::Persistance.
| virtual void VOS::FileSystemPersistance::destroy | ( | ) | [inline, virtual] |
Destry this extension.
By default will do "delete this" but can be overridden if that's not what you want (such as if the extension is shared among several Vobjects.)
Reimplemented from VOS::VobjectExtension.
Definition at line 50 of file fspersist.hh.
| virtual void VOS::FileSystemPersistance::endTransaction | ( | ) | [virtual] |
Commit any blocks saved since the last call to beginTransaction().
Not actually implementsed with all persistance extensions!
Reimplemented from VOS::Persistance.
| virtual bool VOS::FileSystemPersistance::getBlock | ( | Vobject * | from, | |
| const std::string & | key, | |||
| std::string & | data | |||
| ) | [virtual] |
Retrieve a block to the persistance layer.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data data the data will be stored in this string
- Returns:
- true if key was found and data retrieved, false if not
Implements VOS::Persistance.
Reimplemented in VOS::RevisionControlPersistance.
| virtual bool VOS::FileSystemPersistance::isLoadingDB | ( | ) | [inline, virtual] |
- Returns:
- True if the persistance database is currently being loaded; generally during application startup. Code which saves blocks to the database in response to changes should check this flag to ensure that it does not try and save a blocks that was just read in from the database!
Implements VOS::Persistance.
Definition at line 85 of file fspersist.hh.
| virtual void VOS::FileSystemPersistance::post_addToACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | ACLname, | |||
| Vobject * | id, | |||
| const std::string & | oldACLname | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_addType | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| const std::string & | s | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_createVobject | ( | VobjectState & | state, | |
| Vobject * | requester, | |||
| VobjectBase * | newvobject | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_deleteACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | policies, | |||
| AccessControlList * | oldacl | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_insertChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| int | position, | |||
| const std::string & | contextual_name, | |||
| Vobject * | child | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_removeChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| ParentChildRelation * | pcr, | |||
| bool | strict | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_removeFromACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | ACLname, | |||
| Vobject * | id | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_removeType | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| const std::string & | s | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_renameVobject | ( | VobjectState & | state, | |
| Vobject * | requester, | |||
| const std::string & | oldname, | |||
| const std::string & | newname | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_setChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| int | position, | |||
| const std::string & | contextual_name, | |||
| Vobject * | child, | |||
| const std::string & | oldcontextual_name, | |||
| Vobject * | oldchild | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::post_setDefaultPolicy | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | policy, | |||
| const std::string & | oldpolicy | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::readACLs | ( | const char * | dbpath, | |
| Vobject * | obj | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::readChildList | ( | const char * | dbpath, | |
| std::deque< std::pair< std::string, std::string > > & | childlist | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::readDefaultPolicy | ( | const char * | dbpath, | |
| Vobject * | obj | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::readTypes | ( | const char * | dbpath, | |
| std::deque< std::string > & | types | |||
| ) | [protected, virtual] |
| virtual bool VOS::FileSystemPersistance::removeBlock | ( | Vobject * | from, | |
| const std::string & | key | |||
| ) | [virtual] |
Delete a block from the persistance layer.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data
- Returns:
- true if key was found and deleted, false if not
Implements VOS::Persistance.
| virtual void VOS::FileSystemPersistance::siteExtensionAttachedTo | ( | Site * | vb | ) | [virtual] |
| virtual bool VOS::FileSystemPersistance::storeBlock | ( | Vobject * | from, | |
| const std::string & | key, | |||
| const std::string & | data | |||
| ) | [virtual] |
| virtual void VOS::FileSystemPersistance::wipeDatabase | ( | ) | [virtual] |
Reimplemented in VOS::RevisionControlPersistance.
| virtual void VOS::FileSystemPersistance::writeACLs | ( | const std::string & | dbpath, | |
| Vobject * | vobj | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::writeChildren | ( | const std::string & | dbpath, | |
| Vobject * | vobj | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::writeDefaultPolicy | ( | const std::string & | dbpath, | |
| Vobject * | vobj | |||
| ) | [protected, virtual] |
| virtual void VOS::FileSystemPersistance::writeTypes | ( | const std::string & | dbpath, | |
| Vobject * | vobj | |||
| ) | [protected, virtual] |
Member Data Documentation
bool VOS::FileSystemPersistance::readingDB [protected] |
Definition at line 32 of file fspersist.hh.
std::string VOS::FileSystemPersistance::rootdir [protected] |
Definition at line 31 of file fspersist.hh.
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/extensions/fspersist/fspersist.hh