44 this->insertToQueue(i,
true);
49 LruPolicy::doAfterRefresh(
iterator i)
51 this->insertToQueue(i,
false);
57 m_queue.get<1>().erase(i);
63 this->insertToQueue(i,
false);
67 LruPolicy::evictEntries()
69 BOOST_ASSERT(this->
getCs() !=
nullptr);
71 BOOST_ASSERT(!m_queue.empty());
79 LruPolicy::insertToQueue(
iterator i,
bool isNewEntry)
84 std::tie(it, isNew) = m_queue.push_back(i);
86 BOOST_ASSERT(isNew == isNewEntry);
88 m_queue.relocate(m_queue.end(), it);
implements the ContentStore
Cs * getCs() const
gets cs
size_t getLimit() const
gets hard limit (in number of entries)
#define NFD_REGISTER_CS_POLICY(P)
registers a CS policy
LRU cs replacement policy.
Table::const_iterator iterator
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
static const std::string POLICY_NAME
represents a CS replacement policy
signal::Signal< Policy, iterator > beforeEvict
emits when an entry is being evicted