23 DSNHandler(std::shared_ptr<RoutingInformation> routing_info,
24 std::function<
void(
const NodeInfo &node)> request_attribute_inquiry_callback);
50 FindQuery &query,
bool all_information_present,
const uint64_t ×tamp_now);
72 NeighborRelationship relationship);
90 const NodeInfo &inquired_or_updated_node,
91 std::unordered_map<NodeData::Key, NodeData::ValueAndType> attribute_values_and_types,
92 uint64_t update_timestamp);
95 void updateRemovedAttributes(
const NodeInfo &inquired_node,
96 std::vector<NodeData::Key> removed_keys);
99 std::unordered_map<LogicalNodeInfo, DistributedData, LogicalNodeInfoHasher>
getCoverData()
const;
102 void notifyAboutQueryRequest(
const FindQuery &query, uint64_t request_timestamp);
105 std::unordered_map<NodeInfo, std::vector<NodeData::Key>,
NodeInfoHasher>
106 getNodesAndKeysToSubscribe(uint64_t
const ×tamp_now);
109 std::unordered_map<NodeInfo, std::vector<NodeData::Key>,
NodeInfoHasher>
110 getNodesAndKeysToUnsubscribe(uint64_t
const ×tamp_now);
113 void setPlacedSubscriptionOrders(
115 subscription_orders_map);
118 void setPlacedUnsubscriptionOrders(
120 unsubscription_orders_map);
122 NodeData::Attributes getNodeAttributes(
const NodeInfo &node);
127 void checkPosition();
131 void buildCoverArea();
133 void buildExtendedCoverArea();
135 void buildTempCoverArea();
140 bool was_previously_active_ =
false;
146 std::shared_ptr<RoutingInformation> routing_info_;
152 std::unordered_map<LogicalNodeInfo, DistributedData, LogicalNodeInfoHasher> cover_data_;
156 std::vector<std::tuple<uint32_t, uint32_t>> cover_area_positions_;
158 std::vector<std::tuple<uint32_t, uint32_t>> extended_cover_area_positions_;
159 std::unordered_map<LogicalNodeInfo, DistributedData, LogicalNodeInfoHasher> extended_cover_data_;
163 std::unordered_map<NodeData::Key, std::queue<uint64_t>> request_timestamps_;
166 uint8_t timestamp_storage_limit_ = 5;
168 std::function<void(
const NodeInfo &)> request_attribute_inquiry_callback_;
177 static double calculateFrequency(std::queue<uint64_t> timestamps, uint64_t
const ×tamp_now);
void updateInquiredOrSubscribedAttributeValues(const NodeInfo &inquired_or_updated_node, std::unordered_map< NodeData::Key, NodeData::ValueAndType > attribute_values_and_types, uint64_t update_timestamp)
Definition dsn_handler.cpp:291
std::vector< std::tuple< NodeInfo, std::vector< NodeData::Key > > > getUndecidedNodesAndMissingKeys(FindQuery &query, bool all_information_present, const uint64_t ×tamp_now)
Definition dsn_handler.cpp:253