26 #ifndef NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP 27 #define NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP 31 #include <boost/multi_index_container.hpp> 32 #include <boost/multi_index/hashed_index.hpp> 33 #include <boost/multi_index/sequenced_index.hpp> 73 has(
const Name& name, Interest::Nonce nonce)
const;
78 add(
const Name& name, Interest::Nonce nonce);
95 typedef uint64_t Entry;
98 makeEntry(
const Name& name, Interest::Nonce nonce);
100 typedef boost::multi_index_container<
102 boost::multi_index::indexed_by<
103 boost::multi_index::sequenced<>,
104 boost::multi_index::hashed_non_unique<
105 boost::multi_index::identity<Entry>
110 typedef Index::nth_index<0>::type Queue;
111 typedef Index::nth_index<1>::type Hashtable;
144 time::nanoseconds m_lifetime;
162 static const size_t INITIAL_CAPACITY;
168 static const size_t MIN_CAPACITY;
174 static const size_t MAX_CAPACITY;
184 static const Entry MARK;
188 static const size_t EXPECTED_MARK_COUNT;
195 std::multiset<size_t> m_actualMarkCounts;
197 time::nanoseconds m_markInterval;
198 scheduler::EventId m_markEvent;
202 static const double CAPACITY_UP;
203 static const double CAPACITY_DOWN;
204 time::nanoseconds m_adjustCapacityInterval;
205 scheduler::EventId m_adjustCapacityEvent;
208 static const size_t EVICT_LIMIT;
213 #endif // NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
time::nanoseconds getLifetime() const
Represents the Dead Nonce List.
DeadNonceList(time::nanoseconds lifetime=DEFAULT_LIFETIME)
Constructs the Dead Nonce List.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
static const time::nanoseconds MIN_LIFETIME
Minimum entry lifetime.
bool has(const Name &name, Interest::Nonce nonce) const
Determines if name+nonce exists.
void add(const Name &name, Interest::Nonce nonce)
Records name+nonce.
static const time::nanoseconds DEFAULT_LIFETIME
Default entry lifetime.