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.
References get(), getInitialLifetime(), nfd::name_tree::Entry::getMeasurementsEntry(), nfd::name_tree::Entry::getName(), ndn::time::steady_clock::now(), nfd::scheduler::schedule(), and nfd::name_tree::Entry::setMeasurementsEntry().
find or insert a Measurements entry for name
Definition at line 60 of file measurements.cpp.
References nfd::name_tree::NameTree::lookup().
Referenced by Measurements().
Entry & nfd::measurements::Measurements::get | ( | const fib::Entry & | fibEntry | ) |
find or insert a Measurements entry for fibEntry.getPrefix()
Definition at line 67 of file measurements.cpp.
References 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 74 of file measurements.cpp.
References 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 81 of file measurements.cpp.
References ndn::Name::empty(), nfd::name_tree::NameTree::findLongestPrefixMatch(), nfd::name_tree::NameTree::getEntry(), nfd::name_tree::Entry::getMeasurementsEntry(), nfd::measurements::Entry::getName(), and nfd::name_tree::Entry::getParent().
Entry * nfd::measurements::Measurements::findLongestPrefixMatch | ( | const Name & | name, |
const EntryPredicate & | pred = AnyEntry() |
||
) | const |
perform a longest prefix match for name
Definition at line 109 of file measurements.cpp.
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 115 of file measurements.cpp.
perform an exact match
Definition at line 121 of file measurements.cpp.
References nfd::name_tree::NameTree::findExactMatch(), and nfd::name_tree::Entry::getMeasurementsEntry().
|
inlinestatic |
Definition at line 151 of file measurements.hpp.
Referenced by Measurements().
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 128 of file measurements.cpp.
References nfd::scheduler::cancel(), nfd::name_tree::NameTree::eraseIfEmpty(), nfd::name_tree::NameTree::getEntry(), ndn::time::steady_clock::now(), nfd::scheduler::schedule(), and nfd::name_tree::Entry::setMeasurementsEntry().
|
inline |
Definition at line 157 of file measurements.hpp.
Referenced by nfd::ForwarderStatusManager::ForwarderStatusManager().