#include <TcaRegistry.h>
Definition at line 44 of file TcaRegistry.h.
Public Member Functions | |
TcaRegistry () | |
bool | init_nodes () |
bool | init_addrs () |
bool | write (const RegRecord &rr, int ttl) |
bool | read (RegRecord &rr) |
Protected Member Functions | |
CLIENT * | get_node () |
Protected Attributes | |
std::vector < std::string > | dht_nodes_ |
std::vector < sockaddr_in > | dht_addrs_ |
unsigned int | last_node_ |
TcaRegistry::TcaRegistry | ( | ) | [inline] |
Definition at line 48 of file TcaRegistry.h.
bool TcaRegistry::init_nodes | ( | ) |
Definition at line 57 of file TcaRegistry.cc.
References dht_nodes_.
Referenced by TcaController::init().
bool TcaRegistry::init_addrs | ( | ) |
Definition at line 86 of file TcaRegistry.cc.
References dht_addrs_, dht_nodes_, last_node_, and test_node().
Referenced by TcaController::init().
Definition at line 120 of file TcaRegistry.cc.
References APP_STRING, bamboo_put_args::application, bamboo_dht_proc_put_2(), BAMBOO_OK, bamboo_value::bamboo_value_len, bamboo_value::bamboo_value_val, CLIB_STRING, bamboo_put_args::client_library, DHT_KEYLEN, get_node(), hash(), RegRecord::host_, bamboo_put_args::key, RegRecord::link_addr_, bamboo_put_args::ttl_sec, uint8, and bamboo_put_args::value.
Referenced by TcaController::do_registration().
Definition at line 157 of file TcaRegistry.cc.
References APP_STRING, bamboo_get_args::application, bamboo_dht_proc_get_2(), bamboo_value::bamboo_value_val, CLIB_STRING, bamboo_get_args::client_library, DHT_KEYLEN, get_node(), hash(), RegRecord::host_, bamboo_get_args::key, RegRecord::link_addr_, bamboo_get_args::maxvals, uint8, bamboo_get_res::values, bamboo_get_res::values_len, and bamboo_get_res::values_val.
Referenced by TcaController::get_registration().
CLIENT * TcaRegistry::get_node | ( | ) | [protected] |
Definition at line 233 of file TcaRegistry.cc.
References dht_addrs_, get_connection(), and last_node_.
std::vector<std::string> TcaRegistry::dht_nodes_ [protected] |
std::vector<sockaddr_in> TcaRegistry::dht_addrs_ [protected] |
unsigned int TcaRegistry::last_node_ [protected] |