iopc::LruCacheBase Class Reference
[iopclib-cache]

#include <lruCacheBase.h>

Inheritance diagram for iopc::LruCacheBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 LruCacheBase (long minValue=MINLONG, long maxCost=MAXLONG, const Strategy &strat=Strategy::defaultStrategy)
 LruCacheBase (long minValue, long maxCost, StrategySelector *stratSel)

Protected Member Functions

virtual LruCacheItemaddLock (LruCacheItem &item, bool rdonly)=0
virtual void rmLock (LruCacheItem &item)=0


Detailed Description

Common predecessor of extended object caches using LRU replacement policy, they use LruCacheItem to represent stored objects

Constructor & Destructor Documentation

iopc::LruCacheBase::LruCacheBase ( long  minValue = MINLONG,
long  maxCost = MAXLONG,
const Strategy strat = Strategy::defaultStrategy 
) [inline]

Initialize cache with the same strategies for all object.

Parameters:
minValue Minimal value of objects obliged to stay in the cache.
maxCost Maximal total cost of stored objects.
strat Default strategy.

iopc::LruCacheBase::LruCacheBase ( long  minValue,
long  maxCost,
StrategySelector stratSel 
) [inline]

Initialize cache with strategies passed by selector.

Parameters:
minValue Minimal value of objects obliged to stay in the cache.
maxCost Maximal total cost of stored objects.
strat strategy selector.


Member Function Documentation

virtual LruCacheItem& iopc::LruCacheBase::addLock ( LruCacheItem item,
bool  rdonly 
) [protected, pure virtual]

Adds a lock to an item containing an object

Parameters:
item The item the lock should be added to.
rdonly Type of the lock.
Returns:
An item representing new lock (it's the same as the passed one)

Implemented in iopc::LruCache< MapType >, and iopc::LruCacheST< MapType >.

virtual void iopc::LruCacheBase::rmLock ( LruCacheItem item  )  [protected, pure virtual]

Removes one lock of an item representing an object

Parameters:
item The item the lock should be removed from.

Implemented in iopc::LruCache< MapType >, and iopc::LruCacheST< MapType >.


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

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