iopc::FakeExtendedCache Class Reference
[iopclib-cache]

#include <fakeExtendedCache.h>

Inheritance diagram for iopc::FakeExtendedCache:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Cacheclone ()
 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 CacheLockmakePersistent (const StrategySelector &strSel, const PersIdentification &persId, DatabaseObject &objectPtr)
virtual CacheLockgetCacheLock (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)


Detailed Description

Makes basic cache look like an extended one.

Member Function Documentation

void iopc::FakeExtendedCache::setConnection ( Connection conn = NULL  )  [inline, protected, virtual]

Sets the connection associated with cache.

Parameters:
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]

Deletes an object.

Parameters:
persId ID of the object.

Reimplemented from iopc::ExtendedCache.

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.

Parameters:
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.

Parameters:
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.

Parameters:
strSel The strategy selector.
persId ID of the object.
obj Object to be made persistent.
Returns:
An instance representing locked object and making it possible to read and modify the object.

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.

Parameters:
strSel The strategy selector.
persId ID of the object.
rdonly Indicates the type of required access to the object (read-only/write).
Returns:
An instance making it possible to access the object.

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
strSel The strategy selector.

Implements iopc::ExtendedCache.


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

Generated on Tue Apr 14 16:46:44 2009 for IOPC 2 by  doxygen 1.5.6