Base class for NDN content store. More...
#include <ndn-content-store.hpp>
Public Member Functions | |
virtual | ~ContentStore () |
Virtual destructor. More... | |
virtual shared_ptr< Data > | Lookup (shared_ptr< const Interest > interest)=0 |
Find corresponding CS entry for the given interest. More... | |
virtual bool | Add (shared_ptr< const Data > data)=0 |
Add a new content to the content store. More... | |
virtual void | Print (std::ostream &os) const =0 |
Print out content store entries. More... | |
virtual uint32_t | GetSize () const =0 |
Get number of entries in content store. More... | |
virtual Ptr< cs::Entry > | Begin ()=0 |
Return first element of content store (no order guaranteed) More... | |
virtual Ptr< cs::Entry > | End ()=0 |
Return item next after last (no order guaranteed) More... | |
virtual Ptr< cs::Entry > | Next (Ptr< cs::Entry >)=0 |
Advance the iterator. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Interface ID. More... | |
static Ptr< ContentStore > | GetContentStore (Ptr< Object > node) |
Static call to cheat python bindings. More... | |
Protected Attributes | |
TracedCallback< shared_ptr < const Interest >, shared_ptr < const Data > > | m_cacheHitsTrace |
trace of cache hits More... | |
TracedCallback< shared_ptr < const Interest > > | m_cacheMissesTrace |
trace of cache misses More... | |
Base class for NDN content store.
Particular implementations should implement Lookup, Add, and Print methods
Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
Definition at line 100 of file ndn-content-store.hpp.
|
virtual |
Virtual destructor.
Definition at line 49 of file ndn-content-store.cpp.
|
pure virtual |
Add a new content to the content store.
header | Fully parsed Data |
packet | Fully formed Ndn packet to add to content store (will be copied and stripped down of headers) |
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, ns3::ndn::cs::Nocache, ns3::ndn::cs::ContentStoreWithFreshness< Policy >, ns3::ndn::cs::ContentStoreWithFreshness< fifo_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< lfu_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< random_policy_traits >, and ns3::ndn::cs::ContentStoreWithFreshness< lru_policy_traits >.
|
pure virtual |
Return first element of content store (no order guaranteed)
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, and ns3::ndn::cs::Nocache.
|
pure virtual |
Return item next after last (no order guaranteed)
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, and ns3::ndn::cs::Nocache.
|
inlinestatic |
Static call to cheat python bindings.
Definition at line 201 of file ndn-content-store.hpp.
|
pure virtual |
Get number of entries in content store.
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, and ns3::ndn::cs::Nocache.
|
static |
Interface ID.
Definition at line 33 of file ndn-content-store.cpp.
References m_cacheHitsTrace, and m_cacheMissesTrace.
|
pure virtual |
Find corresponding CS entry for the given interest.
interest | Interest for which matching content store entry will be searched |
If an entry is found, it is promoted to the top of most recent used entries index,
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, and ns3::ndn::cs::Nocache.
Advance the iterator.
|
pure virtual |
Print out content store entries.
Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, ns3::ndn::cs::ContentStoreWithStats< Policy >, ns3::ndn::cs::ContentStoreWithStats< fifo_policy_traits >, ns3::ndn::cs::ContentStoreWithStats< lfu_policy_traits >, ns3::ndn::cs::ContentStoreWithStats< random_policy_traits >, ns3::ndn::cs::ContentStoreWithStats< lru_policy_traits >, ns3::ndn::cs::Nocache, ns3::ndn::cs::ContentStoreWithFreshness< Policy >, ns3::ndn::cs::ContentStoreWithFreshness< fifo_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< lfu_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< random_policy_traits >, and ns3::ndn::cs::ContentStoreWithFreshness< lru_policy_traits >.
Referenced by ns3::ndn::operator<<().
|
protected |
trace of cache hits
Definition at line 188 of file ndn-content-store.hpp.
Referenced by GetTypeId().
|
protected |
trace of cache misses
Definition at line 190 of file ndn-content-store.hpp.
Referenced by GetTypeId(), and ns3::ndn::cs::Nocache::Lookup().