nfd::measurements::Measurements Class Reference

represents the Measurements table More...

#include <daemon/table/measurements.hpp>

+ Inheritance diagram for nfd::measurements::Measurements:
+ Collaboration diagram for nfd::measurements::Measurements:

Public Member Functions

 Measurements (NameTree &nametree)
 
void extendLifetime (Entry &entry, const time::nanoseconds &lifetime)
 extend lifetime of an entry More...
 
EntryfindExactMatch (const Name &name) const
 perform an exact match 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...
 
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...
 
size_t size () const
 

Static Public Member Functions

static time::nanoseconds getInitialLifetime ()
 

Detailed Description

represents the Measurements table

Definition at line 75 of file measurements.hpp.

Constructor & Destructor Documentation

nfd::measurements::Measurements::Measurements ( NameTree &  nametree)
explicit

Definition at line 34 of file measurements.cpp.

Member Function Documentation

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.

Entry * nfd::measurements::Measurements::findExactMatch ( const Name &  name) const

perform an exact match

Definition at line 121 of file measurements.cpp.

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.

Entry & nfd::measurements::Measurements::get ( const Name &  name)

find or insert a Measurements entry for name

Definition at line 60 of file measurements.cpp.

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.

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.

time::nanoseconds nfd::measurements::Measurements::getInitialLifetime ( )
inlinestatic

Definition at line 151 of file measurements.hpp.

Entry * nfd::measurements::Measurements::getParent ( const Entry child)

find or insert a Measurements entry for child's parent

Return values
nullptrif child is the root entry

Definition at line 81 of file measurements.cpp.

size_t nfd::measurements::Measurements::size ( ) const
inline

Definition at line 157 of file measurements.hpp.