nfd::pit::OutRecord Class Reference

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

#include <daemon/table/pit-entry.hpp>

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

Public Member Functions

void clearIncomingNack () noexcept
 Clears last Nack. More...
 
void clearStrategyInfo ()
 Clear all StrategyInfo items. More...
 
template<typename T >
size_t eraseStrategyInfo ()
 Erase a StrategyInfo item. More...
 
 FaceRecord (Face &face)
 
time::steady_clock::time_point getExpiry () const noexcept
 Returns the time point at which this record expires. More...
 
FacegetFace () const noexcept
 
const lp::NackHeader * getIncomingNack () const noexcept
 Returns the last Nack returned by getFace(). More...
 
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...
 
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 128 of file pit-entry.hpp.

Member Function Documentation

◆ clearIncomingNack()

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

Clears last Nack.

This is invoked in outgoing Interest pipeline.

Any pointers previously returned by getIncomingNack() are invalidated.

Definition at line 166 of file pit-entry.hpp.

◆ 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.

◆ FaceRecord()

nfd::pit::FaceRecord::FaceRecord
inlineexplicit

Definition at line 57 of file pit-entry.hpp.

◆ getExpiry()

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

Returns the time point at which this record expires.

Returns
getLastRenewed() + InterestLifetime

Definition at line 85 of file pit-entry.hpp.

◆ getFace()

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

Definition at line 63 of file pit-entry.hpp.

◆ getIncomingNack()

const lp::NackHeader* nfd::pit::OutRecord::getIncomingNack ( ) const
inlinenoexcept

Returns the 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 140 of file pit-entry.hpp.

◆ getLastNonce()

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

Definition at line 69 of file pit-entry.hpp.

◆ getLastRenewed()

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

Definition at line 75 of file pit-entry.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.

◆ 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 pointers previously returned by getIncomingNack() are invalidated.

Definition at line 52 of file pit-entry.cpp.

◆ update()

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

Updates lastNonce, lastRenewed, expiry fields.

Definition at line 33 of file pit-entry.cpp.