1 #ifndef _TRANSPORT_CONTEXT_INL_
2 #define _TRANSPORT_CONTEXT_INL_
19 return receive_bandwidth_;
25 return send_bandwidth_;
43 operation_ = operation;
49 receive_bandwidth_ = bandwidth;
55 send_bandwidth_ = bandwidth;
59 uint64_t current_time)
61 current_time_ = current_time;
65 uint64_t message_time)
67 message_time_ = message_time;
73 records_[key] = record;
97 originator_ = originator;
109 endpoint_ = endpoint;
This class encapsulates an entry in a KnowledgeBase.
uint64_t get_send_bandwidth(void) const
Gets the send/rebroadcast bandwidth in bytes per second.
void set_send_bandwidth(uint64_t bandwidth)
Sets the bandwidth used for sends/rebroadcast in bytes per second.
const std::string & get_domain(void) const
Returns the network domain.
void add_record(const std::string &key, const madara::knowledge::KnowledgeRecord &record)
Adds a record to the list that should be appended to send or rebroadcast.
void set_operation(int64_t operation)
Sets the operation that the context is/should be performing.
void set_records(const knowledge::KnowledgeMap &source)
Sets the current message originator.
int64_t get_operation(void) const
Get operation that the context is performing.
void set_receive_bandwidth(uint64_t bandwidth)
Sets the bandwidth used for receives in bytes per second.
uint64_t get_current_time(void) const
Gets the current timestamp.
void clear_records(void)
Clears records added through filtering operations.
void set_domain(const std::string &domain)
Sets the network domain.
void set_endpoint(const std::string &endpoint)
Sets the current message endpoint.
knowledge::KnowledgeMap records_
Context specific records.
const std::string & get_originator(void) const
Returns the current message originator.
uint64_t get_receive_bandwidth(void) const
Gets the receive bandwidth in bytes per second.
uint64_t get_message_time(void) const
Gets the message timestamp.
void set_message_time(uint64_t message_time)
Sets the message time.
void set_current_time(uint64_t current_time)
Sets the current time.
const knowledge::KnowledgeMap & get_records(void) const
Returns the additional records stored in the context.
const std::string & get_endpoint(void) const
Returns the current message endpoint.
void set_originator(const std::string &originator)
Sets the current message originator.
::std::map< std::string, KnowledgeRecord > KnowledgeMap