22 #ifndef NDN_UTIL_IN_MEMORY_STORAGE_FIFO_HPP
23 #define NDN_UTIL_IN_MEMORY_STORAGE_FIFO_HPP
27 #include <boost/multi_index_container.hpp>
28 #include <boost/multi_index/sequenced_index.hpp>
29 #include <boost/multi_index/hashed_index.hpp>
69 typedef boost::multi_index_container<
71 boost::multi_index::indexed_by<
74 boost::multi_index::hashed_unique<
75 boost::multi_index::tag<byEntity>,
76 boost::multi_index::identity<InMemoryStorageEntry*>
80 boost::multi_index::sequenced<
81 boost::multi_index::tag<byArrival>
87 CleanupIndex m_cleanupIndex;
93 #endif // NDN_UTIL_IN_MEMORY_STORAGE_FIFO_HPP
Copyright (c) 2013-2016 Regents of the University of California.
Provides in-memory storage employing FIFO replacement policy, which is first in first out...
InMemoryStorageFifo(size_t limit=10)
Represents in-memory storage.
void afterInsert(InMemoryStorageEntry *entry) override
Update the entry after a entry is successfully inserted, add it to the cleanupIndex.
Represents an in-memory storage entry.
void beforeErase(InMemoryStorageEntry *entry) override
Update the entry or other data structures before a entry is successfully erased, erase it from the cl...
bool evictItem() override
Removes one Data packet from in-memory storage based on FIFO.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED