NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::cs::Entry Class Reference

a ContentStore entry More...

#include <cs-entry.hpp>

Public Member Functions

const DatagetData () const
 return the stored Data More...
 
const NamegetName () const
 return stored Data name More...
 
const NamegetFullName () const
 return full name (including implicit digest) of the stored Data More...
 
bool isUnsolicited () const
 return whether the stored Data is unsolicited More...
 
bool isFresh () const
 check if the stored Data is fresh now More...
 
bool canSatisfy (const Interest &interest) const
 determine whether Interest can be satisified by the stored Data More...
 
 Entry (shared_ptr< const Data > data, bool isUnsolicited)
 
void updateFreshUntil ()
 recalculate when the entry would become non-fresh, relative to current time More...
 
void clearUnsolicited ()
 clear 'unsolicited' flag More...
 

Detailed Description

a ContentStore entry

Definition at line 36 of file cs-entry.hpp.

Constructor & Destructor Documentation

◆ Entry()

nfd::cs::Entry::Entry ( shared_ptr< const Data data,
bool  isUnsolicited 
)

Definition at line 31 of file cs-entry.cpp.

References updateFreshUntil().

Member Function Documentation

◆ getData()

const Data& nfd::cs::Entry::getData ( ) const
inline

return the stored Data

Definition at line 42 of file cs-entry.hpp.

Referenced by nfd::cs::operator<().

◆ getName()

const Name& nfd::cs::Entry::getName ( ) const
inline

return stored Data name

Definition at line 50 of file cs-entry.hpp.

◆ getFullName()

const Name& nfd::cs::Entry::getFullName ( ) const
inline

return full name (including implicit digest) of the stored Data

Definition at line 58 of file cs-entry.hpp.

◆ isUnsolicited()

bool nfd::cs::Entry::isUnsolicited ( ) const
inline

return whether the stored Data is unsolicited

Definition at line 66 of file cs-entry.hpp.

Referenced by nfd::cs::Cs::insert().

◆ isFresh()

bool nfd::cs::Entry::isFresh ( ) const

check if the stored Data is fresh now

Definition at line 39 of file cs-entry.cpp.

References ndn::time::steady_clock::now().

◆ canSatisfy()

bool nfd::cs::Entry::canSatisfy ( const Interest interest) const

determine whether Interest can be satisified by the stored Data

Definition at line 51 of file cs-entry.cpp.

References ndn::Interest::getMustBeFresh(), and ndn::Interest::matchesData().

◆ updateFreshUntil()

void nfd::cs::Entry::updateFreshUntil ( )

recalculate when the entry would become non-fresh, relative to current time

Definition at line 45 of file cs-entry.cpp.

References ndn::time::steady_clock::now().

Referenced by Entry(), and nfd::cs::Cs::insert().

◆ clearUnsolicited()

void nfd::cs::Entry::clearUnsolicited ( )
inline

clear 'unsolicited' flag

Definition at line 92 of file cs-entry.hpp.

Referenced by nfd::cs::Cs::insert().


The documentation for this class was generated from the following files: