A PendingInterest holds an interest which onInterest received but could not satisfy. More...
#include <memory-content-cache.hpp>
Public Member Functions | |
PendingInterest (const ptr_lib::shared_ptr< const Interest > &interest, Face &face) | |
Create a new PendingInterest and set the timeoutTime_ based on the current time and the interest lifetime. More... | |
const ptr_lib::shared_ptr< const Interest > & | getInterest () const |
Return the interest given to the constructor. More... | |
MillisecondsSince1970 | getTimeoutPeriodStart () const |
Return the time when this pending interest entry was created (the time when the unsatisfied interest arrived and was added to the pending interest table). More... | |
Face & | getFace () const |
Return the face given to the constructor. | |
bool | isTimedOut (MillisecondsSince1970 nowMilliseconds) const |
Check if this interest is timed out. More... | |
A PendingInterest holds an interest which onInterest received but could not satisfy.
When we add a new data packet to the cache, we will also check if it satisfies a pending interest.
ndn::MemoryContentCache::PendingInterest::PendingInterest | ( | const ptr_lib::shared_ptr< const Interest > & | interest, |
Face & | face | ||
) |
Create a new PendingInterest and set the timeoutTime_ based on the current time and the interest lifetime.
interest | A shared_ptr for the interest. |
face | The face from the onInterest callback. If the interest is satisfied later by a new data packet, we will send the data packet to the face. |
|
inline |
Return the interest given to the constructor.
You must not modify this object - if you need to modify it then make a copy.
|
inline |
Return the time when this pending interest entry was created (the time when the unsatisfied interest arrived and was added to the pending interest table).
The interest timeout is based on this value.
|
inline |
Check if this interest is timed out.
nowMilliseconds | The current time in milliseconds from ndn_getNowMilliseconds. |