represents Content Store More...
#include <cs.hpp>


Classes | |
| class | const_iterator |
Public Member Functions | |
| Cs (size_t nMaxPackets=10) | |
| ~Cs () | |
| bool | insert (const Data &data, bool isUnsolicited=false) |
| inserts a Data packet This method does not consider the payload of the Data packet. More... | |
| const Data * | find (const Interest &interest) const |
| finds the best match Data for an Interest More... | |
| void | erase (const Name &exactName) |
| deletes CS entry by the exact name More... | |
| void | setLimit (size_t nMaxPackets) |
| sets maximum allowed size of Content Store (in packets) More... | |
| size_t | getLimit () const |
| returns maximum allowed size of Content Store (in packets) More... | |
| size_t | size () const |
| returns current size of Content Store measured in packets More... | |
| const_iterator | begin () const |
| returns an iterator pointing to the first CS entry More... | |
| const_iterator | end () const |
| returns an iterator referring to the past-the-end CS entry More... | |
Protected Member Functions | |
| bool | evictItem () |
| removes one Data packet from Content Store based on replacement policy More... | |
| nfd::Cs::~Cs | ( | ) |
Definition at line 73 of file cs.cpp.
References evictItem().
|
inline |
returns an iterator pointing to the first CS entry
Definition at line 285 of file cs.hpp.
Referenced by evictItem().
|
inline |
| void nfd::Cs::erase | ( | const Name & | exactName | ) |
deletes CS entry by the exact name
Definition at line 747 of file cs.cpp.
References end(), nfd::cs::Entry::getFullName(), NFD_LOG_TRACE, size(), and SKIPLIST_MAX_LAYERS.
Referenced by evictItem().
|
protected |
removes one Data packet from Content Store based on replacement policy
Definition at line 362 of file cs.cpp.
References begin(), erase(), and NFD_LOG_TRACE.
Referenced by insert(), setLimit(), and ~Cs().
| const Data * nfd::Cs::find | ( | const Interest & | interest | ) | const |
finds the best match Data for an Interest
Definition at line 407 of file cs.cpp.
References NFD_LOG_TRACE.
| size_t nfd::Cs::getLimit | ( | ) | const |
| bool nfd::Cs::insert | ( | const Data & | data, |
| bool | isUnsolicited = false |
||
| ) |
inserts a Data packet This method does not consider the payload of the Data packet.
Packets are considered duplicate if the name matches. The new Data packet with the identical name, but a different payload is not placed in the Content Store
Definition at line 265 of file cs.cpp.
References evictItem(), and NFD_LOG_TRACE.
| void nfd::Cs::setLimit | ( | size_t | nMaxPackets | ) |
sets maximum allowed size of Content Store (in packets)
Definition at line 95 of file cs.cpp.
References evictItem(), and size().
Referenced by nfd::TablesConfigSection::ensureTablesAreConfigured().
| size_t nfd::Cs::size | ( | ) | const |
returns current size of Content Store measured in packets
Definition at line 89 of file cs.cpp.
Referenced by erase(), and setLimit().