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.
te::graph::LFUCachePolicy::LFUCachePolicy | ( | ) |
Default constructor.
Definition at line 30 of file LFUCachePolicy .cpp.
|
virtual |
Virtual destructor.
Definition at line 34 of file LFUCachePolicy .cpp.
|
virtual |
Function used to inform that an index was accessed.
value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 73 of file LFUCachePolicy .cpp.
|
virtual |
Function used to add a new index to be controlled.
value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 39 of file LFUCachePolicy .cpp.
|
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 49 of file LFUCachePolicy .cpp.
|
virtual |
Function used to inform that an index must be updated.
value | Object index attribute |
Implements te::graph::AbstractCachePolicy.
Definition at line 44 of file LFUCachePolicy .cpp.
|
protected |
Definition at line 100 of file LFUCachePolicy.h.