All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::graph::LFUCachePolicy Class Reference

This class is used to implement the LFU cache policy. More...

#include <LFUCachePolicy.h>

Inheritance diagram for te::graph::LFUCachePolicy:
te::graph::AbstractCachePolicy

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
 

Detailed Description

This class is used to implement the LFU cache policy.

See also
AbstractCachePolicy

Definition at line 48 of file LFUCachePolicy.h.

Constructor & Destructor Documentation

te::graph::LFUCachePolicy::LFUCachePolicy ( )

Default constructor.

Definition at line 30 of file LFUCachePolicy .cpp.

te::graph::LFUCachePolicy::~LFUCachePolicy ( )
virtual

Virtual destructor.

Definition at line 34 of file LFUCachePolicy .cpp.

Member Function Documentation

void te::graph::LFUCachePolicy::accessed ( int  value)
virtual

Function used to inform that an index was accessed.

Parameters
valueObject index attribute

Implements te::graph::AbstractCachePolicy.

Definition at line 73 of file LFUCachePolicy .cpp.

void te::graph::LFUCachePolicy::added ( int  value)
virtual

Function used to add a new index to be controlled.

Parameters
valueObject index attribute

Implements te::graph::AbstractCachePolicy.

Definition at line 39 of file LFUCachePolicy .cpp.

void te::graph::LFUCachePolicy::toRemove ( int &  value)
virtual

Function used to check what index has to be removed from the cache.

Parameters
valueObject index attribute

Implements te::graph::AbstractCachePolicy.

Definition at line 49 of file LFUCachePolicy .cpp.

void te::graph::LFUCachePolicy::update ( int  value)
virtual

Function used to inform that an index must be updated.

Parameters
valueObject index attribute

Implements te::graph::AbstractCachePolicy.

Definition at line 44 of file LFUCachePolicy .cpp.

Member Data Documentation

std::map<int, double> te::graph::LFUCachePolicy::m_LFU
protected

Definition at line 100 of file LFUCachePolicy.h.


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