NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::cs::lru::LruPolicy Class Reference

LRU cs replacement policy. More...

#include <cs-policy-lru.hpp>

Inheritance diagram for nfd::cs::lru::LruPolicy:
Collaboration diagram for nfd::cs::lru::LruPolicy:

Public Member Functions

 LruPolicy ()
 
- Public Member Functions inherited from nfd::cs::Policy
 Policy (const std::string &policyName)
 
virtual ~Policy ()=default
 
const std::string & getName () const
 
CsgetCs () const
 gets cs More...
 
void setCs (Cs *cs)
 sets cs More...
 
size_t getLimit () const
 gets hard limit (in number of entries) More...
 
void setLimit (size_t nMaxEntries)
 sets hard limit (in number of entries) More...
 
void afterInsert (iterator i)
 invoked by CS after a new entry is inserted More...
 
void afterRefresh (iterator i)
 invoked by CS after an existing entry is refreshed by same Data More...
 
void beforeErase (iterator i)
 invoked by CS before an entry is erased due to management command More...
 
void beforeUse (iterator i)
 invoked by CS before an entry is used to match a lookup More...
 

Static Public Attributes

static const std::string POLICY_NAME = "lru"
 

Additional Inherited Members

- Static Public Member Functions inherited from nfd::cs::Policy
template<typename P >
static void registerPolicy ()
 
static unique_ptr< Policycreate (const std::string &key)
 
- Public Attributes inherited from nfd::cs::Policy
signal::Signal< Policy, iteratorbeforeEvict
 emits when an entry is being evicted More...
 

Detailed Description

LRU cs replacement policy.

The least recently used entries get removed first. Everytime when any entry is used or refreshed, Policy should witness the usage of it.

Definition at line 64 of file cs-policy-lru.hpp.

Constructor & Destructor Documentation

◆ LruPolicy()

nfd::cs::lru::LruPolicy::LruPolicy ( )

Member Data Documentation

◆ POLICY_NAME

const std::string nfd::cs::lru::LruPolicy::POLICY_NAME = "lru"
static

Definition at line 70 of file cs-policy-lru.hpp.


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