allows Strategy to access portion of Measurements table under its namespace More...
#include <measurements-accessor.hpp>
Public Member Functions | |
MeasurementsAccessor (Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy) | |
~MeasurementsAccessor () | |
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 measurements::EntryPredicate &pred=measurements::AnyEntry()) const |
perform a longest prefix match for name More... | |
shared_ptr< measurements::Entry > | findLongestPrefixMatch (const pit::Entry &pitEntry, const measurements::EntryPredicate &pred=measurements::AnyEntry()) const |
perform a longest prefix match for pitEntry.getName() 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... | |
allows Strategy to access portion of Measurements table under its namespace
Definition at line 40 of file measurements-accessor.hpp.
nfd::MeasurementsAccessor::MeasurementsAccessor | ( | Measurements & | measurements, |
const StrategyChoice & | strategyChoice, | ||
const fw::Strategy & | strategy | ||
) |
Definition at line 32 of file measurements-accessor.cpp.
nfd::MeasurementsAccessor::~MeasurementsAccessor | ( | ) |
Definition at line 41 of file measurements-accessor.cpp.
|
inline |
find or insert a Measurements entry for name
Definition at line 109 of file measurements-accessor.hpp.
References nfd::Measurements::get().
Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), nfd::fw::NccStrategy::getMeasurementsEntryInfo(), and nfd::fw::NccStrategy::timeoutOnBestFace().
|
inline |
find or insert a Measurements entry for fibEntry->getPrefix()
Definition at line 115 of file measurements-accessor.hpp.
References nfd::Measurements::get().
|
inline |
find or insert a Measurements entry for pitEntry->getName()
Definition at line 121 of file measurements-accessor.hpp.
References nfd::Measurements::get().
|
inline |
find or insert a Measurements entry for child's parent
nullptr | if child is the root entry |
Definition at line 127 of file measurements-accessor.hpp.
References nfd::Measurements::getParent().
Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), nfd::fw::NccStrategy::getMeasurementsEntryInfo(), and nfd::fw::NccStrategy::timeoutOnBestFace().
|
inline |
perform a longest prefix match for name
Definition at line 133 of file measurements-accessor.hpp.
References nfd::Measurements::findLongestPrefixMatch().
|
inline |
perform a longest prefix match for pitEntry.getName()
Definition at line 140 of file measurements-accessor.hpp.
References nfd::Measurements::findLongestPrefixMatch().
|
inline |
perform an exact match
Definition at line 147 of file measurements-accessor.hpp.
References nfd::Measurements::findExactMatch().
|
inline |
extend lifetime of an entry
The entry will be kept until at least now()+lifetime.
Definition at line 153 of file measurements-accessor.hpp.
References nfd::Measurements::extendLifetime().
Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), and nfd::fw::NccStrategy::timeoutOnBestFace().