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

Provides application cache with persistent storage, of which no replacement policy will be employed. More...

#include <in-memory-storage-persistent.hpp>

Inheritance diagram for ndn::util::InMemoryStoragePersistent:
Collaboration diagram for ndn::util::InMemoryStoragePersistent:

Public Member Functions

 InMemoryStoragePersistent ()
 
virtual ~InMemoryStoragePersistent ()
 
- Public Member Functions inherited from ndn::util::InMemoryStorage
 InMemoryStorage (size_t limit=std::numeric_limits< size_t >::max())
 
virtual ~InMemoryStorage ()
 
void insert (const Data &data)
 Inserts a Data packet. More...
 
shared_ptr< const Datafind (const Interest &interest)
 Finds the best match Data for an Interest. More...
 
shared_ptr< const Datafind (const Name &name)
 Finds the best match Data for a Name with or without the implicit digest. More...
 
void erase (const Name &prefix, const bool isPrefix=true)
 Deletes in-memory storage entry by prefix by default. More...
 
size_t getLimit () const
 
size_t size () const
 
InMemoryStorage::const_iterator begin () const
 Returns begin iterator of the in-memory storage ordering by name with digest. More...
 
InMemoryStorage::const_iterator end () const
 Returns end iterator of the in-memory storage ordering by name with digest. More...
 
virtual void afterInsert (InMemoryStorageEntry *entry)
 Update the entry or other data structures after a entry is successfully inserted according to derived class implemented replacement policy. More...
 
virtual void beforeErase (InMemoryStorageEntry *entry)
 Update the entry or other data structures before a entry is successfully erased according to derived class implemented replacement policy. More...
 
virtual bool evictItem ()=0
 Removes one Data packet from in-memory storage based on derived class implemented replacement policy. More...
 
size_t getCapacity () const
 returns current capacity of in-memory storage (in packets) More...
 
bool isFull () const
 returns true if the in-memory storage uses up the current capacity, false otherwise More...
 
void eraseImpl (const Name &name)
 deletes in-memory storage entries by the Name with implicit digest. More...
 
void printCache (std::ostream &os) const
 Prints contents of the in-memory storage. More...
 
InMemoryStorageEntryselectChild (const Interest &interest, Cache::index< byFullName >::type::iterator startingPoint) const
 Implements child selector (leftmost, rightmost, undeclared). More...
 

Public Attributes

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED __pad0__: virtual bool evictItem()
 
- Public Attributes inherited from ndn::util::InMemoryStorage
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED __pad0__: virtual void afterAccess(InMemoryStorageEntry* entry)
 
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED __pad1__: void setCapacity(size_t nMaxPackets)
 
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad2__: Cache::iterator freeEntry(Cache::iterator it)
 

Additional Inherited Members

- Public Types inherited from ndn::util::InMemoryStorage
typedef boost::multi_index_container< InMemoryStorageEntry *, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< byFullName >, boost::multi_index::const_mem_fun< InMemoryStorageEntry, const Name &,&InMemoryStorageEntry::getFullName >, std::less< Name > > > > Cache
 

Detailed Description

Provides application cache with persistent storage, of which no replacement policy will be employed.

Entries will only be deleted by explicitly application control.

Definition at line 33 of file in-memory-storage-persistent.hpp.

Constructor & Destructor Documentation

ndn::util::InMemoryStoragePersistent::InMemoryStoragePersistent ( )
explicit

Definition at line 27 of file in-memory-storage-persistent.cpp.

ndn::util::InMemoryStoragePersistent::~InMemoryStoragePersistent ( )
virtual

Member Data Documentation

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED ndn::util::InMemoryStoragePersistent::__pad0__

Definition at line 50 of file in-memory-storage-persistent.hpp.


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