NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::measurements::MeasurementsAccessor Class Reference

allows Strategy to access portion of Measurements table under its namespace More...

#include <measurements-accessor.hpp>

Inheritance diagram for nfd::measurements::MeasurementsAccessor:
Collaboration diagram for nfd::measurements::MeasurementsAccessor:

Public Member Functions

 MeasurementsAccessor (Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)
 
 ~MeasurementsAccessor ()
 
Entryget (const Name &name)
 find or insert a Measurements entry for name More...
 
Entryget (const fib::Entry &fibEntry)
 find or insert a Measurements entry for fibEntry->getPrefix() More...
 
Entryget (const pit::Entry &pitEntry)
 find or insert a Measurements entry for pitEntry->getName() More...
 
EntrygetParent (const Entry &child)
 find or insert a Measurements entry for child's parent More...
 
EntryfindLongestPrefixMatch (const Name &name, const EntryPredicate &pred=AnyEntry()) const
 perform a longest prefix match for name More...
 
EntryfindLongestPrefixMatch (const pit::Entry &pitEntry, const EntryPredicate &pred=AnyEntry()) const
 perform a longest prefix match for pitEntry.getName() More...
 
EntryfindExactMatch (const Name &name) const
 perform an exact match More...
 
void extendLifetime (Entry &entry, const time::nanoseconds &lifetime)
 extend lifetime of an entry More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MeasurementsAccessor()

nfd::measurements::MeasurementsAccessor::MeasurementsAccessor ( Measurements measurements,
const StrategyChoice strategyChoice,
const fw::Strategy strategy 
)

Definition at line 33 of file measurements-accessor.cpp.

◆ ~MeasurementsAccessor()

nfd::measurements::MeasurementsAccessor::~MeasurementsAccessor ( )

Definition at line 42 of file measurements-accessor.cpp.

Member Function Documentation

◆ get() [1/3]

◆ get() [2/3]

Entry * nfd::measurements::MeasurementsAccessor::get ( const fib::Entry fibEntry)
inline

find or insert a Measurements entry for fibEntry->getPrefix()

Definition at line 128 of file measurements-accessor.hpp.

References nfd::measurements::Measurements::get().

◆ get() [3/3]

Entry * nfd::measurements::MeasurementsAccessor::get ( const pit::Entry pitEntry)
inline

find or insert a Measurements entry for pitEntry->getName()

Definition at line 134 of file measurements-accessor.hpp.

References nfd::measurements::Measurements::get().

◆ getParent()

Entry * nfd::measurements::MeasurementsAccessor::getParent ( const Entry child)
inline

◆ findLongestPrefixMatch() [1/2]

Entry * nfd::measurements::MeasurementsAccessor::findLongestPrefixMatch ( const Name name,
const EntryPredicate pred = AnyEntry() 
) const
inline

perform a longest prefix match for name

Definition at line 146 of file measurements-accessor.hpp.

References nfd::measurements::Measurements::findLongestPrefixMatch().

Referenced by nfd::fw::asf::AsfMeasurements::getNamespaceInfo().

◆ findLongestPrefixMatch() [2/2]

Entry * nfd::measurements::MeasurementsAccessor::findLongestPrefixMatch ( const pit::Entry pitEntry,
const EntryPredicate pred = AnyEntry() 
) const
inline

perform a longest prefix match for pitEntry.getName()

Definition at line 153 of file measurements-accessor.hpp.

References nfd::measurements::Measurements::findLongestPrefixMatch().

◆ findExactMatch()

Entry * nfd::measurements::MeasurementsAccessor::findExactMatch ( const Name name) const
inline

perform an exact match

Definition at line 160 of file measurements-accessor.hpp.

References nfd::measurements::Measurements::findExactMatch().

◆ extendLifetime()

void nfd::measurements::MeasurementsAccessor::extendLifetime ( Entry entry,
const time::nanoseconds &  lifetime 
)
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.

References nfd::measurements::Measurements::extendLifetime().

Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), and nfd::fw::NccStrategy::timeoutOnBestFace().


The documentation for this class was generated from the following files: