represents the Measurements table More...
#include <measurements.hpp>
Public Member Functions | |
Measurements (NameTree &nametree) | |
Entry & | get (const Name &name) |
find or insert a Measurements entry for name More... | |
Entry & | get (const fib::Entry &fibEntry) |
find or insert a Measurements entry for fibEntry.getPrefix() More... | |
Entry & | get (const pit::Entry &pitEntry) |
find or insert a Measurements entry for pitEntry.getName() More... | |
Entry * | getParent (const Entry &child) |
find or insert a Measurements entry for child's parent More... | |
Entry * | findLongestPrefixMatch (const Name &name, const EntryPredicate &pred=AnyEntry()) const |
perform a longest prefix match for name More... | |
Entry * | findLongestPrefixMatch (const pit::Entry &pitEntry, const EntryPredicate &pred=AnyEntry()) const |
perform a longest prefix match for pitEntry.getName() More... | |
Entry * | findExactMatch (const Name &name) const |
perform an exact match More... | |
void | extendLifetime (Entry &entry, const time::nanoseconds &lifetime) |
extend lifetime of an entry More... | |
size_t | size () const |
Static Public Member Functions | |
static time::nanoseconds | getInitialLifetime () |
represents the Measurements table
Definition at line 75 of file measurements.hpp.
|
explicit |
Definition at line 34 of file measurements.cpp.
find or insert a Measurements entry for name
Definition at line 62 of file measurements.cpp.
References nfd::name_tree::NameTree::lookup().
Referenced by nfd::measurements::MeasurementsAccessor::get().
Entry & nfd::measurements::Measurements::get | ( | const fib::Entry & | fibEntry | ) |
find or insert a Measurements entry for fibEntry.getPrefix()
Definition at line 69 of file measurements.cpp.
References nfd::fib::Entry::getPrefix(), and nfd::name_tree::NameTree::lookup().
Entry & nfd::measurements::Measurements::get | ( | const pit::Entry & | pitEntry | ) |
find or insert a Measurements entry for pitEntry.getName()
Definition at line 76 of file measurements.cpp.
References nfd::pit::Entry::getName(), and nfd::name_tree::NameTree::lookup().
find or insert a Measurements entry for child's parent
nullptr | if child is the root entry |
Definition at line 83 of file measurements.cpp.
References ndn::Name::empty(), nfd::name_tree::NameTree::getEntry(), nfd::measurements::Entry::getName(), and nfd::name_tree::Entry::getParent().
Referenced by nfd::measurements::MeasurementsAccessor::getParent().
Entry * nfd::measurements::Measurements::findLongestPrefixMatch | ( | const Name & | name, |
const EntryPredicate & | pred = AnyEntry() |
||
) | const |
perform a longest prefix match for name
Definition at line 111 of file measurements.cpp.
References nfd::name_tree::NameTree::getMaxDepth().
Referenced by nfd::measurements::MeasurementsAccessor::findLongestPrefixMatch(), and findLongestPrefixMatch().
Entry * nfd::measurements::Measurements::findLongestPrefixMatch | ( | const pit::Entry & | pitEntry, |
const EntryPredicate & | pred = AnyEntry() |
||
) | const |
perform a longest prefix match for pitEntry.getName()
Definition at line 117 of file measurements.cpp.
References findLongestPrefixMatch(), and nfd::pit::Entry::getName().
perform an exact match
Definition at line 123 of file measurements.cpp.
References nfd::name_tree::NameTree::findExactMatch(), and nfd::name_tree::Entry::getMeasurementsEntry().
Referenced by nfd::measurements::MeasurementsAccessor::findExactMatch().
|
inlinestatic |
Definition at line 151 of file measurements.hpp.
void nfd::measurements::Measurements::extendLifetime | ( | Entry & | entry, |
const time::nanoseconds & | lifetime | ||
) |
extend lifetime of an entry
The entry will be kept until at least now()+lifetime.
Definition at line 130 of file measurements.cpp.
References nfd::scheduler::cancel(), nfd::name_tree::NameTree::getEntry(), ndn::time::steady_clock::now(), and nfd::scheduler::schedule().
Referenced by nfd::measurements::MeasurementsAccessor::extendLifetime().
|
inline |
Definition at line 157 of file measurements.hpp.