31 void process(
const MessageVariant &msg)
override;
32 void processTimeout(
const TimeoutType &type)
override;
34 std::future<FindResult> find(
FindQuery query)
override;
36 void localInsert(std::vector<Entry> entries)
override;
37 void localUpdate(std::vector<Entry> entries)
override;
38 void localRemove(std::vector<std::string> keys)
override;
50 void performSendInquiryAggregations(uint64_t ref_event_id,
FindQuery &query);
51 void savePreliminaryResultsFromInquiryAggregation(uint64_t ref_event_id,
52 NodeData::NodesWithAttributes results);
54 void processDSNAggregationTimeout();
55 void processInquiryAggregationTimeout();
57 void notifyAboutFindQueryResults(uint64_t ref_event_id,
const FindQuery &query,
58 NodeData::NodesWithAttributes results);
60 void concludeAggregationOfInquiries(uint64_t ref_event_id);
61 void concludeAggregationOfDSNs(uint64_t ref_event_id);
63 void requestAttributeInformation(
const NodeInfo &node);
65 void optimizeSubscriptions();
66 void updateSubscribers(NodeData::Key key);
68 std::vector<NodeInfo> calcDSNsToSendInitialCDSForwardingTo()
const;
70 static NodeData::NodesWithAttributes filterAggregationResultsAfterInquiries(
71 const NodeData::NodesWithAttributes &full_results,
const FindQuery::FindQueryScope &scope);
73 static NodeData::NodesWithAttributes filterAggregationResultsAfterDSNs(
74 const NodeData::NodesWithAttributes &full_results,
const FindQuery::FindQueryScope &scope);
76 static NodeData::NodesWithAttributes filterDuplicateAttributes(
77 NodeData::NodesWithAttributes full_results);
79 NodeData::NodesWithAttributes getRelevantAttributesAndValues(
80 const std::vector<NodeInfo> &true_nodes,
const FindQuery &query);
82 void logKeyValueContentUpdateInsert(NodeData::Key key, NodeData::Value value,
83 NodeData::ValueType type);
84 void logKeyValueContentRemove(NodeData::Key key);
89 static const uint8_t kFindQuerySomeScopeThreshold = 2;
91 const uint16_t default_num_of_forwarding_hops_per_dsn_ = 5;
93 uint64_t value_time_validity_threshold_at_find_query_request_;
94 uint64_t value_time_validity_threshold_after_inquiry_aggregation_;
96 bool publish_attributes_after_insert_and_removal_ =
true;