26 #ifndef NFD_DAEMON_TABLE_PIT_ENTRY_HPP
27 #define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
31 #include <ndn-cxx/util/scheduler.hpp>
74 time::steady_clock::time_point
84 time::steady_clock::time_point
94 update(
const Interest& interest);
98 Interest::Nonce m_lastNonce{0, 0, 0, 0};
99 time::steady_clock::time_point m_lastRenewed = time::steady_clock::time_point::min();
100 time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
114 BOOST_ASSERT(m_interest !=
nullptr);
119 update(
const Interest& interest);
122 shared_ptr<const Interest> m_interest;
139 const lp::NackHeader*
142 return m_incomingNack.get();
168 m_incomingNack.reset();
172 unique_ptr<lp::NackHeader> m_incomingNack;
200 Entry(
const Interest& interest);
218 return m_interest->getName();
226 canMatch(
const Interest& interest,
size_t nEqualNameComps = 0)
const;
246 return !m_inRecords.empty();
249 InRecordCollection::iterator
252 return m_inRecords.begin();
255 InRecordCollection::const_iterator
258 return m_inRecords.begin();
261 InRecordCollection::iterator
264 return m_inRecords.end();
267 InRecordCollection::const_iterator
270 return m_inRecords.end();
277 InRecordCollection::iterator
284 InRecordCollection::iterator
294 m_inRecords.erase(pos);
325 return !m_outRecords.empty();
328 OutRecordCollection::iterator
331 return m_outRecords.begin();
334 OutRecordCollection::const_iterator
337 return m_outRecords.begin();
340 OutRecordCollection::iterator
343 return m_outRecords.end();
346 OutRecordCollection::const_iterator
349 return m_outRecords.end();
356 OutRecordCollection::iterator
363 OutRecordCollection::iterator
389 shared_ptr<const Interest> m_interest;
395 friend ::nfd::name_tree::Entry;
Base class for an entity onto which StrategyInfo items may be placed.
Generalization of a network interface.
An entry in the name tree.
Represents an entry in the Interest table (PIT).
time::milliseconds dataFreshnessPeriod
Data freshness period.
bool canMatch(const Interest &interest, size_t nEqualNameComps=0) const
InRecordCollection::const_iterator in_end() const noexcept
InRecordCollection::iterator in_begin() noexcept
const Interest & getInterest() const
const OutRecordCollection & getOutRecords() const noexcept
Returns the collection of out-records.
OutRecordCollection::const_iterator out_end() const noexcept
OutRecordCollection::iterator out_begin() noexcept
void deleteInRecord(InRecordCollection::const_iterator pos)
Removes the in-record at position pos.
Entry(const Interest &interest)
void clearInRecords() noexcept
Removes all in-records.
const Name & getName() const
bool isSatisfied
Indicates whether this PIT entry is satisfied.
OutRecordCollection::iterator findOutRecord(const Face &face) noexcept
Get the out-record for face.
OutRecordCollection::iterator out_end() noexcept
const InRecordCollection & getInRecords() const noexcept
Returns the collection of in-records.
OutRecordCollection::iterator insertOrUpdateOutRecord(Face &face, const Interest &interest)
Insert or update an out-record.
InRecordCollection::iterator in_end() noexcept
InRecordCollection::iterator findInRecord(const Face &face) noexcept
Get the in-record for face.
OutRecordCollection::const_iterator out_begin() const noexcept
ndn::scheduler::EventId expiryTimer
Expiry timer.
bool hasOutRecords() const noexcept
InRecordCollection::iterator insertOrUpdateInRecord(Face &face, const Interest &interest)
Insert or update an in-record.
InRecordCollection::const_iterator in_begin() const noexcept
bool hasInRecords() const noexcept
void deleteOutRecord(const Face &face)
Delete the out-record for face if it exists.
Contains information about an Interest on an incoming or outgoing face.
time::steady_clock::time_point getExpiry() const noexcept
Returns the time point at which this record expires.
void update(const Interest &interest)
Updates lastNonce, lastRenewed, expiry fields.
Face & getFace() const noexcept
time::steady_clock::time_point getLastRenewed() const noexcept
Interest::Nonce getLastNonce() const noexcept
Contains information about an Interest from an incoming face.
const Interest & getInterest() const noexcept
void update(const Interest &interest)
Contains information about an Interest toward an outgoing face.
void clearIncomingNack() noexcept
Clears last Nack.
bool setIncomingNack(const lp::Nack &nack)
Sets a Nack received from getFace().
const lp::NackHeader * getIncomingNack() const noexcept
Returns the last Nack returned by getFace().
std::list< OutRecord > OutRecordCollection
An unordered collection of out-records.
std::list< InRecord > InRecordCollection
An unordered collection of in-records.