Allows fw::Strategy to access the portion of Measurements table under its namespace. More...
#include <daemon/table/measurements-accessor.hpp>
Public Member Functions | |
MeasurementsAccessor (Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy) | |
~MeasurementsAccessor () | |
void | extendLifetime (Entry &entry, const time::nanoseconds &lifetime) |
Extend lifetime of an entry. More... | |
Entry * | findExactMatch (const Name &name) const |
Perform an exact match. 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 * | get (const fib::Entry &fibEntry) |
Find or insert a Measurements entry for fibEntry->getPrefix() . More... | |
Entry * | get (const Name &name) |
Find or insert a Measurements entry for name . 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... | |
Allows fw::Strategy to access the portion of Measurements table under its namespace.
All public methods have the same semantics as the corresponding methods on Measurements, but will return nullptr if the entry falls out of the strategy's authority.
Definition at line 46 of file measurements-accessor.hpp.
nfd::measurements::MeasurementsAccessor::MeasurementsAccessor | ( | Measurements & | measurements, |
const StrategyChoice & | strategyChoice, | ||
const fw::Strategy & | strategy | ||
) |
Definition at line 30 of file measurements-accessor.cpp.
nfd::measurements::MeasurementsAccessor::~MeasurementsAccessor | ( | ) |
Definition at line 39 of file measurements-accessor.cpp.
|
inline |
Extend lifetime of an entry.
The entry will be kept until at least now()+lifetime.
Definition at line 165 of file measurements-accessor.hpp.
|
inline |
Perform an exact match.
Definition at line 159 of file measurements-accessor.hpp.
|
inline |
Perform a longest prefix match for name
.
Definition at line 145 of file measurements-accessor.hpp.
|
inline |
Perform a longest prefix match for pitEntry.getName()
.
Definition at line 152 of file measurements-accessor.hpp.
|
inline |
Find or insert a Measurements entry for fibEntry->getPrefix()
.
Definition at line 127 of file measurements-accessor.hpp.
|
inline |
Find or insert a Measurements entry for name
.
Definition at line 121 of file measurements-accessor.hpp.
|
inline |
Find or insert a Measurements entry for pitEntry->getName()
.
Definition at line 133 of file measurements-accessor.hpp.
Find or insert a Measurements entry for child's parent.
Definition at line 139 of file measurements-accessor.hpp.