20 #ifndef PSYNC_FULL_PRODUCER_HPP 21 #define PSYNC_FULL_PRODUCER_HPP 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;
80 const ndn::Name& syncPrefix,
81 const ndn::Name& userPrefix,
83 ndn::time::milliseconds syncInterestLifetime = SYNC_INTEREST_LIFTIME,
102 publishName(
const ndn::Name& prefix, ndn::optional<uint64_t> seq = ndn::nullopt);
130 onSyncInterest(
const ndn::Name& prefixName,
const ndn::Interest& interest);
143 sendSyncData(
const ndn::Name& name,
const ndn::Block& block);
161 onSyncData(
const ndn::Interest& interest,
const ndn::ConstBufferPtr& bufferPtr);
172 satisfyPendingInterests();
178 deletePendingInterests(
const ndn::Name& interestName);
187 isFutureHash(
const ndn::Name& prefix,
const std::set<uint32_t>& negative);
190 std::map<ndn::Name, PendingEntryInfoFull> m_pendingEntries;
191 ndn::time::milliseconds m_syncInterestLifetime;
193 ndn::scheduler::ScopedEventId m_scheduledSyncInterestId;
194 std::uniform_int_distribution<> m_jitter;
195 ndn::Name m_outstandingInterestName;
196 ndn::ScopedRegisteredPrefixHandle m_registeredPrefix;
197 std::shared_ptr<ndn::util::SegmentFetcher> m_fetcher;
202 #endif // PSYNC_FULL_PRODUCER_HPP
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...
ndn::scheduler::ScopedEventId expirationEvent
Invertible Bloom Lookup Table (Invertible Bloom Filter)
const ndn::time::milliseconds SYNC_INTEREST_LIFTIME
#define PSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE
std::function< void(const std::vector< MissingDataInfo > &)> UpdateCallback
Base class for PartialProducer and FullProducer.