implements the ContentStore More...
#include "cs-policy.hpp"
#include "cs-internal.hpp"
#include "cs-entry-impl.hpp"
#include <ndn-cxx/util/signal.hpp>
#include <boost/iterator/transform_iterator.hpp>
Go to the source code of this file.
Classes | |
class | nfd::cs::Cs |
represents the ContentStore More... | |
struct | nfd::cs::Cs::EntryFromEntryImpl |
Namespaces | |
nfd | |
Copyright (c) 2011-2015 Regents of the University of California. | |
nfd::cs | |
implements the ContentStore
This ContentStore implementation consists of two data structures, a Table, and a set of cleanup queues.
The Table is a container (std::set) sorted by full Names of stored Data packets. Data packets are wrapped in Entry objects. Each Entry contain the Data packet itself, and a few addition attributes such as the staleness of the Data packet.
The cleanup queues are three doubly linked lists which stores Table iterators. The three queues keep track of unsolicited, stale, and fresh Data packet, respectively. Table iterator is placed into, removed from, and moved between suitable queues whenever an Entry is added, removed, or has other attribute changes. The Table iterator of an Entry should be in exactly one queue at any moment. Within each queue, the iterators are kept in first-in-first-out order. Eviction procedure exhausts the first queue before moving onto the next queue, in the order of unsolicited, stale, and fresh queue.
Definition in file cs.hpp.