CernVM-FS
2.12.0
|
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 |
Internal LRU list entry, to maintain the doubly linked list. The list keeps track of the least recently used keys in the cache.
|
inline |
|
inline |
|
inlinevirtual |
|
inlineprotected |
Insert a given ListEntry in front of this one
entry | the 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().
|
inlineprotected |
|
pure virtual |
Checks if the ListEntry is the list head
Implemented in lru::LruCache< Key, Value >::ListEntryHead< T >, lru::LruCache< Key, Value >::ListEntryHead< ComparableHash >, lru::LruCache< Key, Value >::ListEntryHead< shash::Md5 >, lru::LruCache< Key, Value >::ListEntryHead< Key >, lru::LruCache< Key, Value >::ListEntryHead< shash::Any >, lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >, lru::LruCache< Key, Value >::ListEntryContent< T >, and lru::LruCache< Key, Value >::ListEntryContent< Key >.
Referenced by lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::clear(), lru::LruCache< shash::Any, MemoryBuffer >::FilterDelete(), lru::LruCache< shash::Any, MemoryBuffer >::FilterGet(), lru::LruCache< shash::Any, MemoryBuffer >::FilterNext(), and lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::Pop().
|
inline |
A lonely ListEntry has no connection to other elements.
Definition at line 321 of file lru.h.
Referenced by lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsPredecessor(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsSuccessor(), lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::IsEmpty(), and lru::LruCache< Key, Value >::ListEntryContent< Key >::RemoveFromList().
|
private |
|
protectedpure virtual |
Remove this element from it's list. The function connects this->next with this->prev leaving the list in a consistent state. The ListEntry itself is lonely afterwards, but not deleted.
Implemented in lru::LruCache< Key, Value >::ListEntryHead< T >, lru::LruCache< Key, Value >::ListEntryHead< ComparableHash >, lru::LruCache< Key, Value >::ListEntryHead< shash::Md5 >, lru::LruCache< Key, Value >::ListEntryHead< Key >, lru::LruCache< Key, Value >::ListEntryHead< shash::Any >, lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >, lru::LruCache< Key, Value >::ListEntryContent< T >, and lru::LruCache< Key, Value >::ListEntryContent< Key >.
Referenced by lru::LruCache< shash::Any, MemoryBuffer >::FilterDelete(), and lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::Pop().
ListEntry<T>* lru::LruCache< Key, Value >::ListEntry< T >::next |
Pointer to next element in the list.
Definition at line 323 of file lru.h.
Referenced by lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::clear(), lru::LruCache< shash::Any, MemoryBuffer >::FilterNext(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsPredecessor(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsSuccessor(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::IsLonely(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::ListEntry(), lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::PopFront(), and lru::LruCache< Key, Value >::ListEntryContent< Key >::RemoveFromList().
ListEntry<T>* lru::LruCache< Key, Value >::ListEntry< T >::prev |
Pointer to previous element in the list.
Definition at line 324 of file lru.h.
Referenced by lru::LruCache< Key, Value >::ListEntryHead< fuse_ino_t >::clear(), lru::LruCache< shash::Any, MemoryBuffer >::FilterDelete(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsPredecessor(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::InsertAsSuccessor(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::IsLonely(), lru::LruCache< Key, Value >::ListEntry< fuse_ino_t >::ListEntry(), and lru::LruCache< Key, Value >::ListEntryContent< Key >::RemoveFromList().