26 #ifndef NFD_DAEMON_TABLE_CS_POLICY_HPP 27 #define NFD_DAEMON_TABLE_CS_POLICY_HPP 43 Policy(
const std::string& policyName);
159 std::
string m_policyName;
164 inline const
std::
string&
191 #endif // NFD_DAEMON_TABLE_CS_POLICY_HPP void setCs(Cs *cs)
sets cs
virtual void evictEntries()=0
evicts zero or more entries
void setLimit(size_t nMaxEntries)
sets hard limit (in number of entries)
Cs * getCs() const
gets cs
signal::Signal< Policy, iterator > beforeEvict
emits when an entry is being evicted
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
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
provides a lightweight signal / event system
Table::const_iterator iterator
represents a CS replacement policy
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
#define DECLARE_SIGNAL_EMIT(signalName)
(implementation detail) declares a 'emit_signalName' method
represents the ContentStore
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)
size_t getLimit() const
gets hard limit (in number of entries)
void afterRefresh(iterator i)
invoked by CS after an existing entry is refreshed by same Data
const std::string & getName() const