|
using | Key = std::map< std::string, Blob > |
|
using | KeySpec = std::map< std::string, size_t > |
|
using | LookupCallback = std::function< void(std::vector< std::shared_ptr< Value > > &values, const Prefix &p)> |
|
typedef void(* | LookupCallbackRaw) (std::vector< std::shared_ptr< Value > > *values, Prefix *p, void *user_data) |
|
using | LookupCallbackSimple = std::function< void(std::vector< std::shared_ptr< Value > > &values)> |
|
typedef void(* | LookupCallbackSimpleRaw) (std::vector< std::shared_ptr< Value > > *values, void *user_data) |
|
|
| Pht (std::string name, KeySpec k_spec, std::shared_ptr< DhtRunner > dht) |
|
void | lookup (Key k, LookupCallback cb={}, DoneCallbackSimple done_cb={}, bool exact_match=true) |
|
void | lookup (Key k, LookupCallbackSimple cb={}, DoneCallbackSimple done_cb={}, bool exact_match=true) |
|
void | insert (Key k, Value v, DoneCallbackSimple done_cb={}) |
|
|
static LookupCallback | bindLookupCb (LookupCallbackRaw raw_cb, void *user_data) |
|
static LookupCallbackSimple | bindLookupCbSimple (LookupCallbackSimpleRaw raw_cb, void *user_data) |
|
Definition at line 288 of file pht.h.
◆ Key
using dht::indexation::Pht::Key = std::map<std::string, Blob> |
◆ KeySpec
using dht::indexation::Pht::KeySpec = std::map<std::string, size_t> |
◆ LookupCallback
using dht::indexation::Pht::LookupCallback = std::function<void(std::vector<std::shared_ptr<Value> >& values, const Prefix& p)> |
◆ LookupCallbackRaw
typedef void(* dht::indexation::Pht::LookupCallbackRaw) (std::vector< std::shared_ptr< Value > > *values, Prefix *p, void *user_data) |
◆ LookupCallbackSimple
using dht::indexation::Pht::LookupCallbackSimple = std::function<void(std::vector<std::shared_ptr<Value> >& values)> |
◆ LookupCallbackSimpleRaw
typedef void(* dht::indexation::Pht::LookupCallbackSimpleRaw) (std::vector< std::shared_ptr< Value > > *values, void *user_data) |
◆ Pht()
dht::indexation::Pht::Pht |
( |
std::string |
name, |
|
|
KeySpec |
k_spec, |
|
|
std::shared_ptr< DhtRunner > |
dht |
|
) |
| |
|
inline |
◆ ~Pht()
virtual dht::indexation::Pht::~Pht |
( |
| ) |
|
|
inlinevirtual |
◆ bindLookupCb()
static LookupCallback dht::indexation::Pht::bindLookupCb |
( |
LookupCallbackRaw |
raw_cb, |
|
|
void * |
user_data |
|
) |
| |
|
inlinestatic |
◆ bindLookupCbSimple()
static LookupCallbackSimple dht::indexation::Pht::bindLookupCbSimple |
( |
LookupCallbackSimpleRaw |
raw_cb, |
|
|
void * |
user_data |
|
) |
| |
|
inlinestatic |
◆ insert()
void dht::indexation::Pht::insert |
( |
Key |
k, |
|
|
Value |
v, |
|
|
DoneCallbackSimple |
done_cb = {} |
|
) |
| |
|
inline |
Wrapper function which call the private one.
- Parameters
-
k | : Key to insert [i.e map of string, blob] |
v | : Value to insert |
done_cb | : Callbakc which going to be call when all the insert is done |
Definition at line 348 of file pht.h.
◆ lookup() [1/2]
void dht::indexation::Pht::lookup |
( |
Key |
k, |
|
|
LookupCallback |
cb = {} , |
|
|
DoneCallbackSimple |
done_cb = {} , |
|
|
bool |
exact_match = true |
|
) |
| |
Lookup a key for a value.
◆ lookup() [2/2]
void dht::indexation::Pht::lookup |
( |
Key |
k, |
|
|
LookupCallbackSimple |
cb = {} , |
|
|
DoneCallbackSimple |
done_cb = {} , |
|
|
bool |
exact_match = true |
|
) |
| |
|
inline |
◆ MAX_NODE_ENTRY_COUNT
constexpr const size_t dht::indexation::Pht::MAX_NODE_ENTRY_COUNT {16} |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- /usr/src/slapt-src/libraries/opendht/opendht-1.7.4/include/opendht/indexation/pht.h