#include <lruCacheBase.h>
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 LruCacheItem & | addLock (LruCacheItem &item, bool rdonly)=0 |
virtual void | rmLock (LruCacheItem &item)=0 |
iopc::LruCacheBase::LruCacheBase | ( | long | minValue = MINLONG , |
|
long | maxCost = MAXLONG , |
|||
const Strategy & | strat = Strategy::defaultStrategy | |||
) | [inline] |
Initialize cache with the same strategies for all object.
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.
minValue | Minimal value of objects obliged to stay in the cache. | |
maxCost | Maximal total cost of stored objects. | |
strat | strategy selector. |
virtual LruCacheItem& iopc::LruCacheBase::addLock | ( | LruCacheItem & | item, | |
bool | rdonly | |||
) | [protected, pure virtual] |
Adds a lock to an item containing an object
item | The item the lock should be added to. | |
rdonly | Type of the lock. |
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
item | The item the lock should be removed from. |
Implemented in iopc::LruCache< MapType >, and iopc::LruCacheST< MapType >.