CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lru::LruCache< Key, Value >::ListEntry< T > Class Template Referenceabstract
Inheritance diagram for lru::LruCache< Key, Value >::ListEntry< T >:

Public Member Functions

 ListEntry ()
 
 ListEntry (const ListEntry< T > &other)
 
virtual ~ListEntry ()
 
virtual bool IsListHead () const =0
 
bool IsLonely () const
 

Public Attributes

ListEntry< T > * next
 
ListEntry< T > * prev
 

Protected Member Functions

void InsertAsSuccessor (ListEntryContent< T > *entry)
 
void InsertAsPredecessor (ListEntryContent< T > *entry)
 
virtual void RemoveFromList ()=0
 

Private Member Functions

ListEntry< T > & operator= (const ListEntry< T > &other)
 

Friends

class LruCache
 

Detailed Description

template<class Key, class Value>
template<class T>
class lru::LruCache< Key, Value >::ListEntry< T >

Internal LRU list entry, to maintain the doubly linked list. The list keeps track of the least recently used keys in the cache.

Definition at line 109 of file lru.h.

Constructor & Destructor Documentation

template<class Key, class Value>
template<class T>
lru::LruCache< Key, Value >::ListEntry< T >::ListEntry ( )
inline

Create a new list entry as lonely, both next and prev pointing to this.

Definition at line 299 of file lru.h.

template<class Key, class Value>
template<class T>
lru::LruCache< Key, Value >::ListEntry< T >::ListEntry ( const ListEntry< T > &  other)
inline

Definition at line 304 of file lru.h.

template<class Key, class Value>
template<class T>
virtual lru::LruCache< Key, Value >::ListEntry< T >::~ListEntry ( )
inlinevirtual

Definition at line 309 of file lru.h.

Member Function Documentation

template<class Key, class Value>
template<class T>
void lru::LruCache< Key, Value >::ListEntry< T >::InsertAsPredecessor ( ListEntryContent< T > *  entry)
inlineprotected

Insert a given ListEntry in front of this one

Parameters
entrythe ListEntry to insert in front of this one

Definition at line 348 of file lru.h.

Referenced by lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::MoveToBack(), and lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::PushBack().

Here is the caller graph for this function:

template<class Key, class Value>
template<class T>
void lru::LruCache< Key, Value >::ListEntry< T >::InsertAsSuccessor ( ListEntryContent< T > *  entry)
inlineprotected

Insert a given ListEntry after this one.

Parameters
entrythe ListEntry to insert after this one

Definition at line 331 of file lru.h.

template<class Key, class Value>
template<class T>
bool lru::LruCache< Key, Value >::ListEntry< T >::IsLonely ( ) const
inline
template<class Key, class Value>
template<class T>
ListEntry<T>& lru::LruCache< Key, Value >::ListEntry< T >::operator= ( const ListEntry< T > &  other)
private
template<class Key, class Value>
template<class T>
virtual void lru::LruCache< Key, Value >::ListEntry< T >::RemoveFromList ( )
protectedpure virtual

Friends And Related Function Documentation

template<class Key, class Value>
template<class T>
friend class LruCache
friend

Definition at line 294 of file lru.h.

Member Data Documentation


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