This class is used to implement the LFU cache policy. More...
#include <LFUCachePolicy.h>
Public Member Functions | |
| LFUCachePolicy () | |
| Default constructor. More... | |
| virtual | ~LFUCachePolicy () |
| Virtual destructor. More... | |
Access Methods | |
Method used to access the cache policy | |
| virtual void | added (int value) |
| Function used to add a new index to be controlled. More... | |
| virtual void | update (int value) |
| Function used to inform that an index must be updated. More... | |
| virtual void | toRemove (int &value) |
| Function used to check what index has to be removed from the cache. More... | |
| virtual void | accessed (int value) |
| Function used to inform that an index was accessed. More... | |
Protected Attributes | |
| std::map< int, double > | m_LFU |
This class is used to implement the LFU cache policy.
Definition at line 48 of file LFUCachePolicy.h.
|
default |
Default constructor.
|
virtual |
|
virtual |
Function used to inform that an index was accessed.
| value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 71 of file LFUCachePolicy.cpp.
References m_LFU.
Referenced by update().
|
virtual |
Function used to add a new index to be controlled.
| value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 37 of file LFUCachePolicy.cpp.
References m_LFU.
|
virtual |
Function used to check what index has to be removed from the cache.
| value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 47 of file LFUCachePolicy.cpp.
References m_LFU.
|
virtual |
Function used to inform that an index must be updated.
| value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 42 of file LFUCachePolicy.cpp.
References accessed().
|
protected |
Definition at line 100 of file LFUCachePolicy.h.
Referenced by accessed(), added(), toRemove(), and ~LFUCachePolicy().