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

Priority FIFO replacement policy. More...

#include <cs-policy-priority-fifo.hpp>

Inheritance diagram for nfd::cs::priority_fifo::PriorityFifoPolicy:
Collaboration diagram for nfd::cs::priority_fifo::PriorityFifoPolicy:

Public Member Functions

 PriorityFifoPolicy ()
 
virtual ~PriorityFifoPolicy ()
 
- 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 = "priority_fifo"
 

Additional Inherited Members

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

Detailed Description

Priority FIFO replacement policy.

This policy maintains a set of cleanup queues to decide the eviction order of CS entries. The cleanup queues are three doubly linked lists that store Table iterators. The three queues keep track of unsolicited, stale, and fresh Data packet, respectively. Table iterator is placed into, removed from, and moved between suitable queues whenever an Entry is added, removed, or has other attribute changes. The Table iterator of an Entry should be in exactly one queue at any moment. Within each queue, the iterators are kept in first-in-first-out order. Eviction procedure exhausts the first queue before moving onto the next queue, in the order of unsolicited, stale, and fresh queue.

Definition at line 78 of file cs-policy-priority-fifo.hpp.

Constructor & Destructor Documentation

◆ PriorityFifoPolicy()

nfd::cs::priority_fifo::PriorityFifoPolicy::PriorityFifoPolicy ( )

Definition at line 36 of file cs-policy-priority-fifo.cpp.

◆ ~PriorityFifoPolicy()

nfd::cs::priority_fifo::PriorityFifoPolicy::~PriorityFifoPolicy ( )
virtual

Definition at line 41 of file cs-policy-priority-fifo.cpp.

Member Data Documentation

◆ POLICY_NAME

const std::string nfd::cs::priority_fifo::PriorityFifoPolicy::POLICY_NAME = "priority_fifo"
static

Definition at line 87 of file cs-policy-priority-fifo.hpp.


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