nfd::pit::FaceRecord Class Reference

Contains information about an Interest on an incoming or outgoing face. More...

#include <daemon/table/pit-face-record.hpp>

+ Inheritance diagram for nfd::pit::FaceRecord:
+ Collaboration diagram for nfd::pit::FaceRecord:

Public Member Functions

 FaceRecord (Face &face)
 
void clearStrategyInfo ()
 Clear all StrategyInfo items. More...
 
template<typename T >
size_t eraseStrategyInfo ()
 Erase a StrategyInfo item. More...
 
time::steady_clock::time_point getExpiry () const noexcept
 Returns the time point at which this record expires. More...
 
FacegetFace () const noexcept
 
Interest::Nonce getLastNonce () const noexcept
 
time::steady_clock::time_point getLastRenewed () const noexcept
 
template<typename T >
T * getStrategyInfo () const
 Get a StrategyInfo item. More...
 
template<typename T , typename ... A>
std::pair< T *, bool > insertStrategyInfo (A &&... args)
 Insert a StrategyInfo item. More...
 
void update (const Interest &interest)
 Updates lastNonce, lastRenewed, expiry fields. More...
 

Detailed Description

Contains information about an Interest on an incoming or outgoing face.

Note
This class is an implementation detail to extract common functionality of InRecord and OutRecord.

Definition at line 39 of file pit-face-record.hpp.

Constructor & Destructor Documentation

◆ FaceRecord()

nfd::pit::FaceRecord::FaceRecord ( Face face)
inlineexplicit

Definition at line 43 of file pit-face-record.hpp.

Member Function Documentation

◆ clearStrategyInfo()

void nfd::StrategyInfoHost::clearStrategyInfo ( )
inlineinherited

Clear all StrategyInfo items.

Definition at line 92 of file strategy-info-host.hpp.

◆ eraseStrategyInfo()

template<typename T >
size_t nfd::StrategyInfoHost::eraseStrategyInfo ( )
inlineinherited

Erase a StrategyInfo item.

Template Parameters
Ttype of StrategyInfo, must be a subclass of fw::StrategyInfo
Returns
number of items erased

Definition at line 82 of file strategy-info-host.hpp.

◆ getExpiry()

time::steady_clock::time_point nfd::pit::FaceRecord::getExpiry ( ) const
inlinenoexcept

Returns the time point at which this record expires.

Returns
getLastRenewed() + InterestLifetime

Definition at line 70 of file pit-face-record.hpp.

◆ getFace()

Face& nfd::pit::FaceRecord::getFace ( ) const
inlinenoexcept

Definition at line 49 of file pit-face-record.hpp.

◆ getLastNonce()

Interest::Nonce nfd::pit::FaceRecord::getLastNonce ( ) const
inlinenoexcept

Definition at line 55 of file pit-face-record.hpp.

◆ getLastRenewed()

time::steady_clock::time_point nfd::pit::FaceRecord::getLastRenewed ( ) const
inlinenoexcept

Definition at line 61 of file pit-face-record.hpp.

◆ getStrategyInfo()

template<typename T >
T* nfd::StrategyInfoHost::getStrategyInfo ( ) const
inlineinherited

Get a StrategyInfo item.

Template Parameters
Ttype of StrategyInfo, must be a subclass of fw::StrategyInfo
Returns
an existing StrategyInfo item of type T, or nullptr if it does not exist

Definition at line 46 of file strategy-info-host.hpp.

◆ insertStrategyInfo()

template<typename T , typename ... A>
std::pair<T*, bool> nfd::StrategyInfoHost::insertStrategyInfo ( A &&...  args)
inlineinherited

Insert a StrategyInfo item.

Template Parameters
Ttype of StrategyInfo, must be a subclass of fw::StrategyInfo
Returns
a new or existing StrategyInfo item of type T, and true for new item, false for existing item

Definition at line 64 of file strategy-info-host.hpp.

◆ update()

void nfd::pit::FaceRecord::update ( const Interest &  interest)

Updates lastNonce, lastRenewed, expiry fields.

Definition at line 34 of file pit-face-record.cpp.