26 #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP 27 #define NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP 50 shared_ptr<measurements::Entry>
55 shared_ptr<measurements::Entry>
60 shared_ptr<measurements::Entry>
66 shared_ptr<measurements::Entry>
71 shared_ptr<measurements::Entry>
72 findLongestPrefixMatch(
const Name&
name,
78 shared_ptr<measurements::Entry>
79 findLongestPrefixMatch(
const pit::Entry& pitEntry,
85 shared_ptr<measurements::Entry>
86 findExactMatch(
const Name& name)
const;
99 shared_ptr<measurements::Entry>
100 filter(
const shared_ptr<measurements::Entry>& entry)
const;
108 inline shared_ptr<measurements::Entry>
111 return this->filter(m_measurements.get(name));
114 inline shared_ptr<measurements::Entry>
117 return this->filter(m_measurements.get(fibEntry));
120 inline shared_ptr<measurements::Entry>
123 return this->filter(m_measurements.get(pitEntry));
126 inline shared_ptr<measurements::Entry>
129 return this->filter(m_measurements.getParent(child));
132 inline shared_ptr<measurements::Entry>
136 return this->filter(m_measurements.findLongestPrefixMatch(name, pred));
139 inline shared_ptr<measurements::Entry>
143 return this->filter(m_measurements.findLongestPrefixMatch(pitEntry, pred));
146 inline shared_ptr<measurements::Entry>
149 return this->filter(m_measurements.findExactMatch(name));
154 const time::nanoseconds& lifetime)
156 m_measurements.extendLifetime(entry, lifetime);
161 #endif // NFD_DAEMON_TABLE_MEASUREMENTS_ACCESSOR_HPP shared_ptr< measurements::Entry > findLongestPrefixMatch(const Name &name, const measurements::EntryPredicate &pred=measurements::AnyEntry()) const
perform a longest prefix match for name
represents the Strategy Choice table
std::function< bool(const Entry &)> EntryPredicate
a predicate that accepts or rejects a Entry
shared_ptr< measurements::Entry > get(const Name &name)
find or insert a Measurements entry for name
represents the Measurements table
represents a Measurements entry
shared_ptr< measurements::Entry > findExactMatch(const Name &name) const
perform an exact match
allows Strategy to access portion of Measurements table under its namespace
Copyright (c) 2011-2015 Regents of the University of California.
an EntryPredicate that accepts any Entry
Name abstraction to represent an absolute name.
represents a forwarding strategy
void extendLifetime(measurements::Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
shared_ptr< measurements::Entry > getParent(const measurements::Entry &child)
find or insert a Measurements entry for child's parent