an Interest table entry More...
#include <pit-entry.hpp>
Public Member Functions | |
Entry (const Interest &interest) | |
const Interest & | getInterest () const |
const Name & | getName () const |
bool | canMatch (const Interest &interest, size_t nEqualNameComps=0) const |
const InRecordCollection & | getInRecords () const |
bool | hasInRecords () const |
InRecordCollection::iterator | in_begin () |
InRecordCollection::const_iterator | in_begin () const |
InRecordCollection::iterator | in_end () |
InRecordCollection::const_iterator | in_end () const |
InRecordCollection::iterator | getInRecord (const Face &face) |
get the in-record for face More... | |
InRecordCollection::iterator | insertOrUpdateInRecord (Face &face, const Interest &interest) |
insert or update an in-record More... | |
void | deleteInRecord (const Face &face) |
delete the in-record for face if it exists More... | |
void | clearInRecords () |
delete all in-records More... | |
const OutRecordCollection & | getOutRecords () const |
bool | hasOutRecords () const |
OutRecordCollection::iterator | out_begin () |
OutRecordCollection::const_iterator | out_begin () const |
OutRecordCollection::iterator | out_end () |
OutRecordCollection::const_iterator | out_end () const |
OutRecordCollection::iterator | getOutRecord (const Face &face) |
get the out-record for face More... | |
OutRecordCollection::iterator | insertOrUpdateOutRecord (Face &face, const Interest &interest) |
insert or update an out-record More... | |
void | deleteOutRecord (const Face &face) |
delete the out-record for face if it exists More... | |
Public Member Functions inherited from nfd::StrategyInfoHost | |
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... | |
template<typename T > | |
size_t | eraseStrategyInfo () |
erase a StrategyInfo item More... | |
void | clearStrategyInfo () |
clear all StrategyInfo items More... | |
Public Attributes | |
scheduler::EventId | m_unsatisfyTimer |
unsatisfy timer More... | |
scheduler::EventId | m_stragglerTimer |
straggler timer More... | |
Friends | |
class | name_tree::Entry |
an Interest table entry
An Interest table entry represents either a pending Interest or a recently satisfied Interest. Each entry contains a collection of in-records, a collection of out-records, and two timers used in forwarding pipelines. In addition, the entry, in-records, and out-records are subclasses of StrategyInfoHost, which allows forwarding strategy to store arbitrary information on them.
Definition at line 57 of file pit-entry.hpp.
|
explicit |
Definition at line 32 of file pit-entry.cpp.
|
inline |
Definition at line 69 of file pit-entry.hpp.
Referenced by nfd::insertNonceToDnl(), and nfd::fw::Strategy::lookupFib().
|
inline |
Definition at line 77 of file pit-entry.hpp.
Referenced by nfd::name_tree::NameTree::findLongestPrefixMatch(), nfd::insertNonceToDnl(), nfd::name_tree::NameTree::lookup(), and nfd::fw::violatesScope().
bool nfd::pit::Entry::canMatch | ( | const Interest & | interest, |
size_t | nEqualNameComps = 0 |
||
) | const |
interest | the Interest |
nEqualNameComps | number of initial name components guaranteed to be equal |
Definition at line 39 of file pit-entry.cpp.
References ndn::Interest::getName(), ndn::Interest::getSelectors(), and ndn::Name::npos.
Referenced by insertOrUpdateInRecord(), and insertOrUpdateOutRecord().
|
inline |
Definition at line 93 of file pit-entry.hpp.
Referenced by nfd::fw::findDuplicateNonce(), ns3::ndn::L3RateTracer::SatisfiedInterests(), and ns3::ndn::L3RateTracer::TimedOutInterests().
|
inline |
true | There is at least one in-record. This implies some downstream is waiting for Data or Nack. |
false | There is no in-record. This implies the entry is new or has been satisfied or Nacked. |
Definition at line 104 of file pit-entry.hpp.
|
inline |
Definition at line 110 of file pit-entry.hpp.
Referenced by nfd::fw::canForwardToLegacy(), nfd::fw::Strategy::lookupFib(), and nfd::fw::violatesScope().
|
inline |
Definition at line 116 of file pit-entry.hpp.
|
inline |
Definition at line 122 of file pit-entry.hpp.
Referenced by nfd::fw::canForwardToLegacy(), nfd::fw::Strategy::lookupFib(), and nfd::fw::violatesScope().
|
inline |
Definition at line 128 of file pit-entry.hpp.
InRecordCollection::iterator nfd::pit::Entry::getInRecord | ( | const Face & | face | ) |
get the in-record for face
Definition at line 51 of file pit-entry.cpp.
InRecordCollection::iterator nfd::pit::Entry::insertOrUpdateInRecord | ( | Face & | face, |
const Interest & | interest | ||
) |
insert or update an in-record
Definition at line 58 of file pit-entry.cpp.
References canMatch().
void nfd::pit::Entry::deleteInRecord | ( | const Face & | face | ) |
delete the in-record for face
if it exists
Definition at line 74 of file pit-entry.cpp.
Referenced by nfd::pit::Pit::deleteInOutRecords().
void nfd::pit::Entry::clearInRecords | ( | ) |
delete all in-records
Definition at line 84 of file pit-entry.cpp.
|
inline |
Definition at line 159 of file pit-entry.hpp.
Referenced by nfd::fw::findDuplicateNonce(), nfd::insertNonceToDnl(), ns3::ndn::L3RateTracer::SatisfiedInterests(), and ns3::ndn::L3RateTracer::TimedOutInterests().
|
inline |
true | There is at least one out-record. This implies the Interest has been forwarded to some upstream, and they haven't returned Data, but may have returned Nacks. |
false | There is no out-record. This implies the Interest has not been forwarded. |
Definition at line 171 of file pit-entry.hpp.
|
inline |
Definition at line 177 of file pit-entry.hpp.
Referenced by nfd::fw::canForwardToLegacy(), nfd::fw::RetxSuppression::getLastOutgoing(), and nfd::fw::hasPendingOutRecords().
|
inline |
Definition at line 183 of file pit-entry.hpp.
|
inline |
Definition at line 189 of file pit-entry.hpp.
Referenced by nfd::fw::canForwardToLegacy(), nfd::fw::RetxSuppression::getLastOutgoing(), and nfd::fw::hasPendingOutRecords().
|
inline |
Definition at line 195 of file pit-entry.hpp.
OutRecordCollection::iterator nfd::pit::Entry::getOutRecord | ( | const Face & | face | ) |
get the out-record for face
Definition at line 90 of file pit-entry.cpp.
Referenced by nfd::insertNonceToDnl().
OutRecordCollection::iterator nfd::pit::Entry::insertOrUpdateOutRecord | ( | Face & | face, |
const Interest & | interest | ||
) |
insert or update an out-record
Definition at line 97 of file pit-entry.cpp.
References canMatch().
void nfd::pit::Entry::deleteOutRecord | ( | const Face & | face | ) |
delete the out-record for face
if it exists
Definition at line 113 of file pit-entry.cpp.
Referenced by nfd::pit::Pit::deleteInOutRecords().
|
friend |
Definition at line 246 of file pit-entry.hpp.
scheduler::EventId nfd::pit::Entry::m_unsatisfyTimer |
unsatisfy timer
This timer is used in forwarding pipelines to delete the entry when it expires without being satisfied. It fires when the last InterestLifetime among in-records expires.
Either this or the straggler timer should be set at all times, except when this entry is being processed in a pipeline.
Definition at line 227 of file pit-entry.hpp.
Referenced by nfd::compare_InRecord_expiry().
scheduler::EventId nfd::pit::Entry::m_stragglerTimer |
straggler timer
This timer is used in forwarding pipelines to delete the entry when it has been satisfied and is no longer needed for measurement collection purpose.
Either this or the unsatisfy timer should be set at all times, except when this entry is being processed in a pipeline.
Definition at line 237 of file pit-entry.hpp.
Referenced by nfd::compare_InRecord_expiry().