20 #ifndef PSYNC_FULL_PRODUCER_HPP 21 #define PSYNC_FULL_PRODUCER_HPP 27 #include <unordered_set> 30 #include <ndn-cxx/face.hpp> 31 #include <ndn-cxx/security/key-chain.hpp> 32 #include <ndn-cxx/util/scheduler.hpp> 33 #include <ndn-cxx/util/segment-fetcher.hpp> 34 #include <ndn-cxx/util/time.hpp> 47 typedef std::function<void(const std::vector<MissingDataInfo>&)>
UpdateCallback;
78 const ndn::Name& syncPrefix,
79 const ndn::Name& userPrefix,
81 ndn::time::milliseconds syncInterestLifetime = SYNC_INTEREST_LIFTIME,
98 publishName(
const ndn::Name& prefix, ndn::optional<uint64_t> seq = ndn::nullopt);
127 onSyncInterest(
const ndn::Name& prefixName,
const ndn::Interest& interest);
141 sendSyncData(
const ndn::Name& name,
const ndn::Block& block);
159 onSyncData(
const ndn::Interest& interest,
const ndn::ConstBufferPtr& bufferPtr);
169 satisfyPendingInterests();
175 deletePendingInterests(
const ndn::Name& interestName);
184 isFutureHash(
const ndn::Name& prefix,
const std::set<uint32_t>& negative);
187 std::map<ndn::Name, PendingEntryInfoFull> m_pendingEntries;
188 ndn::time::milliseconds m_syncInterestLifetime;
190 ndn::util::scheduler::ScopedEventId m_scheduledSyncInterestId;
191 std::uniform_int_distribution<> m_jitter;
192 ndn::Name m_outstandingInterestName;
193 ndn::ScopedRegisteredPrefixHandle m_registeredPrefix;
194 std::shared_ptr<ndn::util::SegmentFetcher> m_fetcher;
199 #endif // PSYNC_FULL_PRODUCER_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const ndn::time::milliseconds SYNC_REPLY_FRESHNESS
Full sync logic to synchronize with other nodes where all nodes wants to get all names prefixes synce...
Invertible Bloom Lookup Table (Invertible Bloom Filter)
const ndn::time::milliseconds SYNC_INTEREST_LIFTIME
ndn::util::scheduler::ScopedEventId expirationEvent
std::function< void(const std::vector< MissingDataInfo > &)> UpdateCallback
Base class for PartialProducer and FullProducer.