26 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
27 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
38 namespace measurements {
56 get(
const Name& name);
104 filter(
Entry* entry)
const;
107 filter(
Entry& entry)
const;
111 const StrategyChoice& m_strategyChoice;
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));
177 #endif // NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP
Entry & get(const Name &name)
find or insert a Measurements entry for name
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
represents a Measurements entry
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
perform a longest prefix match for name
std::function< bool(const Entry &)> EntryPredicate
a predicate that accepts or rejects an entry
Entry * findExactMatch(const Name &name) const
perform an exact match
Entry * getParent(const Entry &child)
find or insert a Measurements entry for child's parent
represents the Measurements table
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
MeasurementsAccessor(Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)
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 * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
perform a longest prefix match for name
represents a forwarding strategy
Entry * findExactMatch(const Name &name) const
perform an exact match
an EntryPredicate that accepts any entry
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
Entry * get(const Name &name)
find or insert a Measurements entry for name