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

an Entry in ContentStore implementation More...

#include <cs-entry-impl.hpp>

Inheritance diagram for nfd::cs::EntryImpl:
Collaboration diagram for nfd::cs::EntryImpl:

Public Member Functions

 EntryImpl (const Name &name)
 construct Entry for query More...
 
 EntryImpl (shared_ptr< const Data > data, bool isUnsolicited)
 construct Entry for storage More...
 
bool canStale () const
 
void unsetUnsolicited ()
 
bool operator< (const EntryImpl &other) const
 
- Public Member Functions inherited from nfd::cs::Entry
const DatagetData () const
 
const NamegetName () const
 
const NamegetFullName () const
 
bool isUnsolicited () const
 
const time::steady_clock::TimePointgetStaleTime () const
 
bool isStale () const
 checks if the stored Data is stale now More...
 
bool canSatisfy (const Interest &interest) const
 determines whether Interest can be satisified by the stored Data More...
 
bool hasData () const
 
void setData (shared_ptr< const Data > data, bool isUnsolicited)
 replaces the stored Data More...
 
void setData (const Data &data, bool isUnsolicited)
 replaces the stored Data More...
 
void updateStaleTime ()
 refreshes stale time relative to current time More...
 
void reset ()
 clears the entry More...
 

Detailed Description

an Entry in ContentStore implementation

An Entry is either a stored Entry which contains a Data packet and related attributes, or a query Entry which contains a Name that is LessComparable to other stored/query Entry and is used to lookup a container of entries.

Note
This type is internal to this specific ContentStore implementation.

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

Constructor & Destructor Documentation

§ EntryImpl() [1/2]

nfd::cs::EntryImpl::EntryImpl ( const Name name)

construct Entry for query

Note
Name is implicitly convertible to Entry, so that Name can be passed to lookup functions on a container of Entry

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

§ EntryImpl() [2/2]

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

construct Entry for storage

Definition at line 37 of file cs-entry-impl.cpp.

References nfd::cs::Entry::hasData(), and nfd::cs::Entry::setData().

Member Function Documentation

§ canStale()

bool nfd::cs::EntryImpl::canStale ( ) const
Returns
true if entry can become stale, false if entry is never stale

Definition at line 50 of file cs-entry-impl.cpp.

References nfd::cs::Entry::getStaleTime().

§ unsetUnsolicited()

void nfd::cs::EntryImpl::unsetUnsolicited ( )

Definition at line 57 of file cs-entry-impl.cpp.

References nfd::cs::Entry::getData(), and nfd::cs::Entry::setData().

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

§ operator<()

bool nfd::cs::EntryImpl::operator< ( const EntryImpl other) const

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