38 static Registry registry;
45 Registry& registry = getRegistry();
46 auto i = registry.find(key);
47 return i == registry.end() ? nullptr : i->second();
51 : m_policyName(policyName)
59 m_limit = nMaxEntries;
66 BOOST_ASSERT(m_cs !=
nullptr);
73 BOOST_ASSERT(m_cs !=
nullptr);
80 BOOST_ASSERT(m_cs !=
nullptr);
87 BOOST_ASSERT(m_cs !=
nullptr);
virtual void evictEntries()=0
evicts zero or more entries
void setLimit(size_t nMaxEntries)
sets hard limit (in number of entries)
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
virtual void doAfterRefresh(iterator i)=0
invoked after an existing entry is refreshed by same Data
virtual void doBeforeUse(iterator i)=0
invoked before an entry is used to match a lookup
#define NFD_LOG_INFO(expression)
Table::const_iterator iterator
void beforeErase(iterator i)
invoked by CS before an entry is erased due to management command
Copyright (c) 2011-2015 Regents of the University of California.
void beforeUse(iterator i)
invoked by CS before an entry is used to match a lookup
virtual void doBeforeErase(iterator i)=0
invoked before an entry is erased due to management command
static unique_ptr< Policy > create(const std::string &key)
void afterInsert(iterator i)
invoked by CS after a new entry is inserted
virtual void doAfterInsert(iterator i)=0
invoked after a new entry is created in CS
Policy(const std::string &policyName)
#define NFD_LOG_INIT(name)
void afterRefresh(iterator i)
invoked by CS after an existing entry is refreshed by same Data