RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lru::Cache< Key, Value, MapType, LockType > Class Template Reference

#include <LRUCache.h>

Classes

class  KeyNotFound
 

Public Member Functions

 Cache (size_t maxSize=64, size_t elasticity=10)
 
void clear ()
 
void insert (const Key &key, const Value &value)
 
bool tryGet (const Key &key, Value &value)
 
const Value & get (const Key &key)
 
void remove (const Key &key)
 
bool contains (const Key &key)
 
void dumpDebug (std::ostream &os) const
 
int currentSize ()
 

Static Public Member Functions

static void printVisitor (const Node< Key, Value > &node)
 

Protected Member Functions

size_t prune ()
 

Detailed Description

template<class Key, class Value, class MapType = std::map<Key, Node<Key, Value>*>, class LockType = NullLock>
class lru::Cache< Key, Value, MapType, LockType >

The LRU Cache class templated by Key - key type Value - value type MapType - an associative container like std::map LockType - a lock type derived from the Lock class (default: NullLock = no synchronization)


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