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

Default constructor.

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

Virtual destructor.

Definition at line 32 of file LFUCachePolicy.cpp.

References m_LFU.

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 71 of file LFUCachePolicy.cpp.

References m_LFU.

Referenced by update().

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 37 of file LFUCachePolicy.cpp.

References m_LFU.

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 47 of file LFUCachePolicy.cpp.

References m_LFU.

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 42 of file LFUCachePolicy.cpp.

References accessed().

Member Data Documentation

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

Definition at line 100 of file LFUCachePolicy.h.

Referenced by accessed(), added(), toRemove(), and ~LFUCachePolicy().


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