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 () | |
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... | |
allows Strategy to access portion of Measurements table under its namespace
All public methods have the same semantics as the same method on Measurements
, but would return nullptr if the entry falls out of the strategy's authority.
Definition at line 45 of file measurements-accessor.hpp.
nfd::measurements::MeasurementsAccessor::MeasurementsAccessor | ( | Measurements & | measurements, |
const StrategyChoice & | strategyChoice, | ||
const fw::Strategy & | strategy | ||
) |
Definition at line 33 of file measurements-accessor.cpp.
nfd::measurements::MeasurementsAccessor::~MeasurementsAccessor | ( | ) |
Definition at line 42 of file measurements-accessor.cpp.
References nfd::fw::Strategy.
find or insert a Measurements entry for name
Definition at line 122 of file measurements-accessor.hpp.
|
inline |
find or insert a Measurements entry for fibEntry->getPrefix()
Definition at line 128 of file measurements-accessor.hpp.
|
inline |
find or insert a Measurements entry for pitEntry->getName()
Definition at line 134 of file measurements-accessor.hpp.
find or insert a Measurements entry for child's parent
Definition at line 140 of file measurements-accessor.hpp.
|
inline |
perform a longest prefix match for name
Definition at line 146 of file measurements-accessor.hpp.
|
inline |
perform a longest prefix match for pitEntry.getName()
Definition at line 153 of file measurements-accessor.hpp.
perform an exact match
Definition at line 160 of file measurements-accessor.hpp.
|
inline |
extend lifetime of an entry
The entry will be kept until at least now()+lifetime.
Definition at line 166 of file measurements-accessor.hpp.