20 #ifndef PSYNC_FULL_PRODUCER_HPP 21 #define PSYNC_FULL_PRODUCER_HPP 28 #include <ndn-cxx/util/segment-fetcher.hpp> 63 const ndn::Name& syncPrefix,
64 const ndn::Name& userPrefix,
66 ndn::time::milliseconds syncInterestLifetime = SYNC_INTEREST_LIFTIME,
85 publishName(
const ndn::Name& prefix, ndn::optional<uint64_t> seq = ndn::nullopt);
113 onSyncInterest(
const ndn::Name& prefixName,
const ndn::Interest& interest);
126 sendSyncData(
const ndn::Name& name,
const ndn::Block& block);
144 onSyncData(
const ndn::Interest& interest,
const ndn::ConstBufferPtr& bufferPtr);
155 satisfyPendingInterests();
161 deletePendingInterests(
const ndn::Name& interestName);
170 isFutureHash(
const ndn::Name& prefix,
const std::set<uint32_t>& negative);
173 struct PendingEntryInfo
176 ndn::scheduler::ScopedEventId expirationEvent;
179 std::map<ndn::Name, PendingEntryInfo> m_pendingEntries;
180 ndn::time::milliseconds m_syncInterestLifetime;
182 ndn::scheduler::ScopedEventId m_scheduledSyncInterestId;
183 std::uniform_int_distribution<> m_jitter;
184 ndn::Name m_outstandingInterestName;
185 ndn::ScopedRegisteredPrefixHandle m_registeredPrefix;
186 std::shared_ptr<ndn::util::SegmentFetcher> m_fetcher;
191 #endif // PSYNC_FULL_PRODUCER_HPP FullProducer(size_t expectedNumEntries, ndn::Face &face, const ndn::Name &syncPrefix, const ndn::Name &userPrefix, const UpdateCallback &onUpdateCallBack, ndn::time::milliseconds syncInterestLifetime=SYNC_INTEREST_LIFTIME, ndn::time::milliseconds syncReplyFreshness=SYNC_REPLY_FRESHNESS, CompressionScheme ibltCompression=CompressionScheme::DEFAULT, CompressionScheme contentCompression=CompressionScheme::DEFAULT)
constructor
Invertible Bloom Lookup Table (Invertible Bloom Filter)
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...
void publishName(const ndn::Name &prefix, ndn::optional< uint64_t > seq=ndn::nullopt)
Publish name to let others know.
const ndn::time::milliseconds SYNC_INTEREST_LIFTIME
std::function< void(const std::vector< MissingDataInfo > &)> UpdateCallback
#define PSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Base class for PartialProducer and FullProducer.