#include <fakeExtendedCache.h>
Public Member Functions | |
virtual Cache * | clone () |
Creates a copy of the current cache. | |
Protected Member Functions | |
virtual void | setConnection (Connection *conn=NULL) |
Sets the connection associated with cache. | |
virtual void | clear () |
Synchronizes states of the cache and database. | |
virtual void | dbDelete (const PersIdentification &persId) |
Deletes an object. | |
virtual void | cacheDelete (const PersIdentification &persId) |
Represents a hint for the cache to remove local copy of an object. | |
virtual void | updateDirty () |
Synchronize the state of cache and DB by updating the DB. | |
virtual void | removeAll () |
Synchronize the state of cache and DB by discarding all kept object (without modifications to DB). | |
virtual void | clear (const StrategySelector &strSel) |
virtual CacheLock & | makePersistent (const StrategySelector &strSel, const PersIdentification &persId, DatabaseObject &objectPtr) |
virtual CacheLock & | getCacheLock (const StrategySelector &strSel, const PersIdentification &persId, bool rdonly=false) |
virtual void | dbDelete (const StrategySelector &strSel, const PersIdentification &persId) |
virtual void | cacheDelete (const StrategySelector &strSel, const PersIdentification &persId) |
virtual void | updateDirty (const StrategySelector &strSel) |
virtual void | removeAll (const StrategySelector &strSel) |
void iopc::FakeExtendedCache::setConnection | ( | Connection * | conn = NULL |
) | [inline, protected, virtual] |
Sets the connection associated with cache.
conn | The connection. |
Reimplemented from iopc::Cache.
void iopc::FakeExtendedCache::clear | ( | ) | [inline, protected, virtual] |
Synchronizes states of the cache and database.
Removes all objects. Makes it possible to harmlessly break association of the cache and its connection.
Reimplemented from iopc::ExtendedCache.
void iopc::FakeExtendedCache::dbDelete | ( | const PersIdentification & | persId | ) | [inline, protected, virtual] |
void iopc::FakeExtendedCache::cacheDelete | ( | const PersIdentification & | persId | ) | [inline, protected, virtual] |
Represents a hint for the cache to remove local copy of an object.
Can be ignored.
persId | ID of the object. |
Reimplemented from iopc::ExtendedCache.
void iopc::FakeExtendedCache::clear | ( | const StrategySelector & | strSel | ) | [inline, protected, virtual] |
Synchronizes states of the cache and database. Removes all objects. Makes it possible to harmlessly break association of the cache and its connection. Uses strategy selector passed by caller.
strSel | The strategy selector. |
Implements iopc::ExtendedCache.
CacheLock & iopc::FakeExtendedCache::makePersistent | ( | const StrategySelector & | strSel, | |
const PersIdentification & | persId, | |||
DatabaseObject & | objectPtr | |||
) | [inline, protected, virtual] |
Saves an object into database. Locks it in cache. Uses strategy selector passed by caller.
strSel | The strategy selector. | |
persId | ID of the object. | |
obj | Object to be made persistent. |
Implements iopc::ExtendedCache.
CacheLock & iopc::FakeExtendedCache::getCacheLock | ( | const StrategySelector & | strSel, | |
const PersIdentification & | persId, | |||
bool | rdonly = false | |||
) | [inline, protected, virtual] |
Assures an object is in cache, locks it and returns an instance making it possible to access the object. Uses strategy selector passed by caller.
strSel | The strategy selector. | |
persId | ID of the object. | |
rdonly | Indicates the type of required access to the object (read-only/write). |
Implements iopc::ExtendedCache.
void iopc::FakeExtendedCache::dbDelete | ( | const StrategySelector & | strSel, | |
const PersIdentification & | persId | |||
) | [inline, protected, virtual] |
Deletes an object. Uses strategy selector passed by caller.
strSel | The strategy selector. | |
persId | ID of the object. |
Implements iopc::ExtendedCache.
void iopc::FakeExtendedCache::cacheDelete | ( | const StrategySelector & | strSel, | |
const PersIdentification & | persId | |||
) | [inline, protected, virtual] |
Represents a hint for the cache to remove local copy of an object. Can be ignored. Uses strategy selector passed by caller.
strSel | The strategy selector. | |
persId | ID of the object. |
Implements iopc::ExtendedCache.
void iopc::FakeExtendedCache::updateDirty | ( | const StrategySelector & | strSel | ) | [inline, protected, virtual] |
Synchronize the state of cache and DB by updating the DB. Uses strategy selector passed by caller.
strSel | The strategy selector. |
Implements iopc::ExtendedCache.
void iopc::FakeExtendedCache::removeAll | ( | const StrategySelector & | strSel | ) | [inline, protected, virtual] |
Synchronize the state of cache and DB by discarding all kept object (without modifications to DB).http://www-ucjf.troja.mff.cuni.cz/scheirich/comics/mff_life_09.jpg Uses strategy selector passed by caller.
strSel | The strategy selector. |
Implements iopc::ExtendedCache.