#include <measurements.hpp>
Public Member Functions | |
Measurements (NameTree &nametree) | |
shared_ptr< measurements::Entry > | get (const Name &name) |
find or insert a Measurements entry for name More... | |
shared_ptr< measurements::Entry > | get (const fib::Entry &fibEntry) |
find or insert a Measurements entry for fibEntry->getPrefix() More... | |
shared_ptr< measurements::Entry > | get (const pit::Entry &pitEntry) |
find or insert a Measurements entry for pitEntry->getName() More... | |
shared_ptr< measurements::Entry > | getParent (const measurements::Entry &child) |
find or insert a Measurements entry for child's parent More... | |
shared_ptr< measurements::Entry > | findLongestPrefixMatch (const Name &name) const |
perform a longest prefix match More... | |
shared_ptr< measurements::Entry > | findExactMatch (const Name &name) const |
perform an exact match More... | |
void | extendLifetime (measurements::Entry &entry, const time::nanoseconds &lifetime) |
extend lifetime of an entry More... | |
size_t | size () const |
Static Public Member Functions | |
static time::nanoseconds | getInitialLifetime () |
Definition at line 46 of file measurements.hpp.
|
explicit |
Definition at line 33 of file measurements.cpp.
void nfd::Measurements::extendLifetime | ( | measurements::Entry & | entry, |
const time::nanoseconds & | lifetime | ||
) |
extend lifetime of an entry
The entry will be kept until at least now()+lifetime.
Definition at line 112 of file measurements.cpp.
References nfd::scheduler::cancel(), nfd::NameTree::get(), and nfd::scheduler::schedule().
Referenced by nfd::MeasurementsAccessor::extendLifetime().
shared_ptr< measurements::Entry > nfd::Measurements::findExactMatch | ( | const Name & | name | ) | const |
perform an exact match
Definition at line 103 of file measurements.cpp.
References nfd::NameTree::lookup().
shared_ptr< measurements::Entry > nfd::Measurements::findLongestPrefixMatch | ( | const Name & | name | ) | const |
perform a longest prefix match
Definition at line 92 of file measurements.cpp.
References nfd::NameTree::findLongestPrefixMatch(), and nfd::name_tree::Entry::getMeasurementsEntry().
shared_ptr< measurements::Entry > nfd::Measurements::get | ( | const Name & | name | ) |
find or insert a Measurements entry for name
Definition at line 58 of file measurements.cpp.
References nfd::NameTree::lookup().
Referenced by nfd::MeasurementsAccessor::get().
shared_ptr< measurements::Entry > nfd::Measurements::get | ( | const fib::Entry & | fibEntry | ) |
find or insert a Measurements entry for fibEntry->getPrefix()
Definition at line 65 of file measurements.cpp.
References nfd::NameTree::get().
shared_ptr< measurements::Entry > nfd::Measurements::get | ( | const pit::Entry & | pitEntry | ) |
find or insert a Measurements entry for pitEntry->getName()
Definition at line 72 of file measurements.cpp.
References nfd::NameTree::get().
|
inlinestatic |
Definition at line 110 of file measurements.hpp.
shared_ptr< measurements::Entry > nfd::Measurements::getParent | ( | const measurements::Entry & | child | ) |
find or insert a Measurements entry for child's parent
nullptr | if child is the root entry |
Definition at line 79 of file measurements.cpp.
References nfd::NameTree::get(), nfd::measurements::Entry::getName(), and nfd::name_tree::Entry::getParent().
Referenced by nfd::MeasurementsAccessor::getParent().
|
inline |
Definition at line 116 of file measurements.hpp.