26 #ifndef NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP 27 #define NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP 30 #include <boost/multi_index_container.hpp> 31 #include <boost/multi_index/sequenced_index.hpp> 32 #include <boost/multi_index/hashed_index.hpp> 73 has(
const Name& name, uint32_t nonce)
const;
78 add(
const Name& name, uint32_t nonce);
88 const time::nanoseconds&
92 typedef uint64_t Entry;
95 makeEntry(
const Name& name, uint32_t nonce);
97 typedef boost::multi_index_container<
99 boost::multi_index::indexed_by<
100 boost::multi_index::sequenced<>,
101 boost::multi_index::hashed_non_unique<
102 boost::multi_index::identity<Entry>
107 typedef Index::nth_index<0>::type Queue;
108 typedef Index::nth_index<1>::type Hashtable;
142 time::nanoseconds m_lifetime;
160 static const size_t INITIAL_CAPACITY;
166 static const size_t MIN_CAPACITY;
172 static const size_t MAX_CAPACITY;
182 static const Entry MARK;
186 static const size_t EXPECTED_MARK_COUNT;
193 std::multiset<size_t> m_actualMarkCounts;
195 time::nanoseconds m_markInterval;
197 scheduler::EventId m_markEvent;
201 static const double CAPACITY_UP;
203 static const double CAPACITY_DOWN;
205 time::nanoseconds m_adjustCapacityInterval;
207 scheduler::EventId m_adjustCapacityEvent;
211 static const size_t EVICT_LIMIT;
214 inline const time::nanoseconds&
222 #endif // NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP
const time::nanoseconds & getLifetime() const
void add(const Name &name, uint32_t nonce)
records name+nonce
bool has(const Name &name, uint32_t nonce) const
determines if name+nonce exists
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
represents the Dead Nonce list
DeadNonceList(const 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
static const time::nanoseconds DEFAULT_LIFETIME
default entry lifetime