26 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP 27 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP 38 namespace measurements {
56 get(
const Name& name);
71 getParent(
const Entry& child);
76 findLongestPrefixMatch(
const Name& name,
83 findLongestPrefixMatch(
const pit::Entry& pitEntry,
90 findExactMatch(
const Name& name)
const;
97 extendLifetime(
Entry& entry,
const time::nanoseconds& lifetime);
104 filter(
Entry* entry)
const;
107 filter(
Entry& entry)
const;
116 MeasurementsAccessor::filter(
Entry& entry)
const 118 return this->filter(&entry);
124 return this->filter(m_measurements.get(name));
130 return this->filter(m_measurements.get(fibEntry));
136 return this->filter(m_measurements.get(pitEntry));
142 return this->filter(m_measurements.getParent(child));
149 return this->filter(m_measurements.findLongestPrefixMatch(name, pred));
156 return this->filter(m_measurements.findLongestPrefixMatch(pitEntry, pred));
162 return this->filter(m_measurements.findExactMatch(name));
168 m_measurements.extendLifetime(entry, lifetime);
177 #endif // NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
Represents a Measurements entry.
Represents the Strategy Choice table.
std::function< bool(const Entry &)> EntryPredicate
A predicate that accepts or rejects an entry.
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
perform a longest prefix match for name
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
allows Strategy to access portion of Measurements table under its namespace
Entry * getParent(const Entry &child)
find or insert a Measurements entry for child's parent
Entry * findExactMatch(const Name &name) const
perform an exact match
Represents a forwarding strategy.
An EntryPredicate that accepts any entry.
Entry * get(const Name &name)
find or insert a Measurements entry for name