represents the ContentStore More...
#include <daemon/table/cs.hpp>
Classes | |
struct | EntryFromEntryImpl |
Public Types | |
typedef boost::transform_iterator< EntryFromEntryImpl, iterator, const Entry & > | const_iterator |
ContentStore iterator (public API) More... | |
typedef std::function< void(const Interest &, const Data &data)> | HitCallback |
typedef std::function< void(const Interest &)> | MissCallback |
Public Member Functions | |
Cs (size_t nMaxPackets=10) | |
const_iterator | begin () const |
const_iterator | end () const |
void | erase (const Name &exactName) |
void | find (const Interest &interest, const HitCallback &hitCallback, const MissCallback &missCallback) const |
finds the best matching Data packet More... | |
size_t | getLimit () const |
Policy * | getPolicy () const |
void | insert (const Data &data, bool isUnsolicited=false) |
inserts a Data packet More... | |
void | setLimit (size_t nMaxPackets) |
changes capacity (in number of packets) More... | |
void | setPolicy (unique_ptr< Policy > policy) |
changes cs replacement policy More... | |
size_t | size () const |
typedef boost::transform_iterator<EntryFromEntryImpl, iterator, const Entry&> nfd::cs::Cs::const_iterator |
typedef std::function<void(const Interest&, const Data& data)> nfd::cs::Cs::HitCallback |
typedef std::function<void(const Interest&)> nfd::cs::Cs::MissCallback |
|
inline |
|
inline |
void nfd::cs::Cs::find | ( | const Interest & | interest, |
const HitCallback & | hitCallback, | ||
const MissCallback & | missCallback | ||
) | const |
finds the best matching Data packet
interest | the Interest for lookup |
hitCallback | a callback if a match is found; must not be empty |
missCallback | a callback if there's no match; must not be empty |
size_t nfd::cs::Cs::getLimit | ( | ) | const |
|
inline |
void nfd::cs::Cs::insert | ( | const Data & | data, |
bool | isUnsolicited = false |
||
) |
void nfd::cs::Cs::setLimit | ( | size_t | nMaxPackets | ) |
void nfd::cs::Cs::setPolicy | ( | unique_ptr< Policy > | policy | ) |