nfd::pit::OutRecord Class Reference

Contains information about an Interest toward an outgoing face. More...

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

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

Public Member Functions

void clearIncomingNack ()
 clears last NACK More...
 
void clearStrategyInfo ()
 Clear all StrategyInfo items. More...
 
template<typename T >
size_t eraseStrategyInfo ()
 Erase a StrategyInfo item. More...
 
time::steady_clock::TimePoint getExpiry () const
 Returns the time point at which this record expires. More...
 
FacegetFace () const
 
const lp::NackHeader * getIncomingNack () const
 
Interest::Nonce getLastNonce () const
 
time::steady_clock::TimePoint getLastRenewed () const
 
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...
 
bool setIncomingNack (const lp::Nack &nack)
 sets a NACK received from getFace() More...
 
void update (const Interest &interest)
 updates lastNonce, lastRenewed, expiry fields More...
 

Detailed Description

Contains information about an Interest toward an outgoing face.

Definition at line 36 of file pit-out-record.hpp.

Member Function Documentation

◆ clearIncomingNack()

void nfd::pit::OutRecord::clearIncomingNack ( )
inline

clears last NACK

This is invoked in outgoing Interest pipeline. This invalidates any pointer previously returned by .getIncomingNack() .

Definition at line 69 of file pit-out-record.hpp.

◆ clearStrategyInfo()

void nfd::StrategyInfoHost::clearStrategyInfo ( )
inlineinherited

Clear all StrategyInfo items.

Definition at line 93 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::TimePoint nfd::pit::FaceRecord::getExpiry ( ) const
inlineinherited

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
inlineinherited

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

◆ getIncomingNack()

const lp::NackHeader* nfd::pit::OutRecord::getIncomingNack ( ) const
inline
Returns
last NACK returned by getFace()

A nullptr return value means the Interest is still pending or has timed out. A non-null return value means the last outgoing Interest has been NACKed.

Definition at line 47 of file pit-out-record.hpp.

◆ getLastNonce()

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

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

◆ getLastRenewed()

time::steady_clock::TimePoint nfd::pit::FaceRecord::getLastRenewed ( ) const
inlineinherited

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 44 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 63 of file strategy-info-host.hpp.

◆ setIncomingNack()

bool nfd::pit::OutRecord::setIncomingNack ( const lp::Nack &  nack)

sets a NACK received from getFace()

Returns
whether incoming NACK is accepted

This is invoked in incoming NACK pipeline. An incoming NACK is accepted if its Nonce matches getLastNonce(). If accepted, nack.getHeader() will be copied, and any pointer previously returned by .getIncomingNack() .

Definition at line 32 of file pit-out-record.cpp.

◆ update()

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

updates lastNonce, lastRenewed, expiry fields

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