psync Namespace Reference

Namespaces

 tlv
 

Classes

class  BloomFilter
 
class  BloomParameters
 
class  Consumer
 Consumer logic to subscribe to producer's data. More...
 
class  Error
 
class  FullProducer
 Full sync logic to synchronize with other nodes where all nodes wants to get all names prefixes synced. More...
 
class  HashTableEntry
 
class  IBLT
 Invertible Bloom Lookup Table (Invertible Bloom Filter) More...
 
struct  MissingDataInfo
 
struct  optimal_parameters_t
 
class  PartialProducer
 Partial sync logic to publish data names. More...
 
struct  PendingEntryInfo
 
struct  PendingEntryInfoFull
 
class  ProducerBase
 Base class for PartialProducer and FullProducer. More...
 
class  SegmentPublisher
 Segment Publisher to publish segmented data. More...
 
class  State
 

Typedefs

typedef std::function< void(const std::vector< ndn::Name > &)> ReceiveHelloCallback
 
typedef std::function< void(const std::vector< MissingDataInfo > &)> UpdateCallback
 

Enumerations

enum  CompressionScheme {
  CompressionScheme::NONE,
  CompressionScheme::ZLIB,
  CompressionScheme::GZIP,
  CompressionScheme::BZIP2,
  CompressionScheme::LZMA,
  CompressionScheme::ZSTD
}
 

Functions

std::shared_ptr< ndn::Buffer > compress (CompressionScheme scheme, const uint8_t *buffer, size_t bufferSize)
 
std::shared_ptr< ndn::Buffer > decompress (CompressionScheme scheme, const uint8_t *buffer, size_t bufferSize)
 
uint32_t murmurHash3 (uint32_t nHashSeed, const std::vector< unsigned char > &vDataToHash)
 
uint32_t murmurHash3 (uint32_t nHashSeed, const std::string &str)
 
uint32_t murmurHash3 (uint32_t nHashSeed, uint32_t value)
 
const size_t N_HASH (3)
 
const size_t N_HASHCHECK (11)
 
 NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS (State)
 
 NDN_LOG_INIT (psync.Consumer)
 
bool operator!= (const IBLT &iblt1, const IBLT &iblt2)
 
std::ostream & operator<< (std::ostream &os, const State &state)
 
std::ostream & operator<< (std::ostream &out, const IBLT &iblt)
 
std::ostream & operator<< (std::ostream &out, const BloomFilter &bf)
 
bool operator== (const IBLT &iblt1, const IBLT &iblt2)
 
bool operator== (const BloomFilter &bf1, const BloomFilter &bf2)
 
static uint32_t ROTL32 (uint32_t x, int8_t r)
 

Variables

static const unsigned char bit_mask [bits_per_char]
 
static const std::size_t bits_per_char = 0x08
 
const ndn::time::milliseconds HELLO_INTEREST_LIFETIME = 1_s
 
const ndn::time::milliseconds HELLO_REPLY_FRESHNESS = 1_s
 
const int MAX_SEGMENTS_STORED = 100
 
const size_t N_HASH
 
const size_t N_HASHCHECK
 
const ndn::time::milliseconds SYNC_INTEREST_LIFETIME = 1_s
 
const ndn::time::milliseconds SYNC_INTEREST_LIFTIME = 1_s
 
const ndn::time::milliseconds SYNC_REPLY_FRESHNESS = 1_s
 

Typedef Documentation

◆ ReceiveHelloCallback

typedef std::function<void(const std::vector<ndn::Name>&)> psync::ReceiveHelloCallback

Definition at line 40 of file consumer.hpp.

◆ UpdateCallback

typedef std::function< void(const std::vector< MissingDataInfo > &)> psync::UpdateCallback

Definition at line 41 of file consumer.hpp.

Enumeration Type Documentation

◆ CompressionScheme

Enumerator
NONE 
ZLIB 
GZIP 
BZIP2 
LZMA 
ZSTD 

Definition at line 51 of file util.hpp.

Function Documentation

◆ compress()

std::shared_ptr< ndn::Buffer > psync::compress ( CompressionScheme  scheme,
const uint8_t *  buffer,
size_t  bufferSize 
)

Definition at line 132 of file util.cpp.

◆ decompress()

std::shared_ptr< ndn::Buffer > psync::decompress ( CompressionScheme  scheme,
const uint8_t *  buffer,
size_t  bufferSize 
)

Definition at line 187 of file util.cpp.

◆ murmurHash3() [1/3]

uint32_t psync::murmurHash3 ( uint32_t  nHashSeed,
const std::vector< unsigned char > &  vDataToHash 
)

Definition at line 61 of file util.cpp.

◆ murmurHash3() [2/3]

uint32_t psync::murmurHash3 ( uint32_t  nHashSeed,
const std::string &  str 
)

Definition at line 118 of file util.cpp.

◆ murmurHash3() [3/3]

uint32_t psync::murmurHash3 ( uint32_t  nHashSeed,
uint32_t  value 
)

Definition at line 124 of file util.cpp.

◆ N_HASH()

const size_t psync::N_HASH ( )

◆ N_HASHCHECK()

const size_t psync::N_HASHCHECK ( 11  )

◆ NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS()

psync::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS ( State  )

◆ NDN_LOG_INIT()

psync::NDN_LOG_INIT ( psync.  Consumer)

◆ operator!=()

bool psync::operator!= ( const IBLT iblt1,
const IBLT iblt2 
)

Definition at line 202 of file iblt.cpp.

◆ operator<<() [1/3]

std::ostream & psync::operator<< ( std::ostream &  os,
const State state 
)

Definition at line 97 of file state.cpp.

◆ operator<<() [2/3]

std::ostream & psync::operator<< ( std::ostream &  out,
const IBLT iblt 
)

Definition at line 208 of file iblt.cpp.

◆ operator<<() [3/3]

std::ostream & psync::operator<< ( std::ostream &  out,
const BloomFilter bf 
)

Definition at line 341 of file bloom-filter.cpp.

◆ operator==() [1/2]

bool psync::operator== ( const IBLT iblt1,
const IBLT iblt2 
)

Definition at line 181 of file iblt.cpp.

◆ operator==() [2/2]

bool psync::operator== ( const BloomFilter bf1,
const BloomFilter bf2 
)

Definition at line 323 of file bloom-filter.cpp.

◆ ROTL32()

static uint32_t psync::ROTL32 ( uint32_t  x,
int8_t  r 
)
static

Definition at line 55 of file util.cpp.

Variable Documentation

◆ bit_mask

const unsigned char psync::bit_mask[bits_per_char]
static
Initial value:
= {
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80
}

Definition at line 65 of file bloom-filter.cpp.

◆ bits_per_char

const std::size_t psync::bits_per_char = 0x08
static

Definition at line 64 of file bloom-filter.cpp.

◆ HELLO_INTEREST_LIFETIME

const ndn::time::milliseconds psync::HELLO_INTEREST_LIFETIME = 1_s

Definition at line 43 of file consumer.hpp.

◆ HELLO_REPLY_FRESHNESS

const ndn::time::milliseconds psync::HELLO_REPLY_FRESHNESS = 1_s

Definition at line 42 of file partial-producer.hpp.

◆ MAX_SEGMENTS_STORED

const int psync::MAX_SEGMENTS_STORED = 100

Definition at line 34 of file segment-publisher.hpp.

◆ N_HASH

const size_t psync::N_HASH

◆ N_HASHCHECK

const size_t psync::N_HASHCHECK

◆ SYNC_INTEREST_LIFETIME

const ndn::time::milliseconds psync::SYNC_INTEREST_LIFETIME = 1_s

Definition at line 44 of file consumer.hpp.

◆ SYNC_INTEREST_LIFTIME

const ndn::time::milliseconds psync::SYNC_INTEREST_LIFTIME = 1_s

Definition at line 49 of file full-producer.hpp.

◆ SYNC_REPLY_FRESHNESS

const ndn::time::milliseconds psync::SYNC_REPLY_FRESHNESS = 1_s

Definition at line 46 of file producer-base.hpp.