MADARA  3.4.1
TransportSettings.inl
Go to the documentation of this file.
1 #ifndef _MADARA_TRANSPORT_SETTINGS_INL_
2 #define _MADARA_TRANSPORT_SETTINGS_INL_
3 
11 #include "TransportSettings.h"
12 
14  const std::string & domain)
15 {
16  read_domains_[domain] = 1;
17 }
18 
20 {
21  read_domains_.clear();
22 }
23 
25  const std::string& prefix)
26 {
27  debug_to_kb_prefix = prefix;
28 }
29 
31  std::vector<std::string>& domains) const
32 {
33  domains.clear();
34  for (std::map<std::string, int>::const_iterator i = read_domains_.begin();
35  i != read_domains_.end(); ++i)
36  {
37  domains.push_back(i->first);
38  }
39 }
40 
42  const std::string domain) const
43 {
44  return read_domains_.find(domain) != read_domains_.end();
45 }
46 
48 {
49  return read_domains_.size();
50 }
51 
52 #endif // _MADARA_TRANSPORT_SETTINGS_INL_
void add_read_domain(const std::string &domain)
Adds a read domain to the list of domains to read from.
std::map< std::string, int > read_domains_
Any acceptable read domain is added here.
void get_read_domains(std::vector< std::string > &domains) const
Retrieves the list of read domains.
void debug_to_kb(const std::string &prefix=".transport")
Requests all debugging for threads go into the data plane KB instead of the control plane.
bool is_reading_domain(const std::string domain) const
Checks if a domain is in the domain read list.
void clear_read_domains(void)
Clears the list of read domains.
size_t num_read_domains(void) const
Returns the number of read domains.
constexpr string_t string