43 bool hasKey(ProcedureKey key)
const;
45 void save(ProcedureKey key,
const std::vector<minhton::NodeInfo> &value);
46 std::vector<minhton::NodeInfo> load(ProcedureKey key);
47 void update(ProcedureKey key,
const std::vector<minhton::NodeInfo> &value);
48 void remove(ProcedureKey key);
50 void saveEventId(ProcedureKey key, uint64_t event_id);
51 uint64_t loadEventId(ProcedureKey key);
52 void removeEventId(ProcedureKey key);
54 void saveFindQuery(uint64_t ref_event_id,
const FindQuery &value);
55 FindQuery loadFindQuery(uint64_t ref_event_id);
56 void updateFindQuery(uint64_t ref_event_id,
const FindQuery &value);
57 void removeFindQuery(uint64_t ref_event_id);
59 void saveFindQueryUndecidedNodes(uint64_t ref_event_id,
const std::vector<NodeInfo> &value);
60 std::vector<NodeInfo> loadFindQueryUndecidedNodes(uint64_t ref_event_id);
61 void updateFindQueryUndecidedNodes(uint64_t ref_event_id,
const std::vector<NodeInfo> &value);
62 void removeFindQueryUndecidedNodes(uint64_t ref_event_id);
64 void saveFindQueryPreliminaryResults(uint64_t ref_event_id,
65 const NodeData::NodesWithAttributes &value);
66 NodeData::NodesWithAttributes loadFindQueryPreliminaryResults(uint64_t ref_event_id);
67 void addFindQueryPreliminaryResults(uint64_t ref_event_id,
const NodeInfo &node,
68 NodeData::Attributes value);
69 void removeFindQueryPreliminaryResults(uint64_t ref_event_id);
71 void saveDSNAggregationStartTimestamp(uint64_t ref_event_id, uint64_t value);
72 uint64_t loadDSNAggregationStartTimestamp(uint64_t ref_event_id);
73 void updateDSNAggregationStartTimestamp(uint64_t ref_event_id, uint64_t value);
74 void removeDSNAggregationStartTimestamp(uint64_t ref_event_id);
75 std::unordered_map<uint64_t, uint64_t> getDSNAggregationStartTimestampMap()
const;
77 void saveInquiryAggregationStartTimestamp(uint64_t ref_event_id, uint64_t value);
78 uint64_t loadInquiryAggregationStartTimestamp(uint64_t ref_event_id);
79 void updateInquiryAggregationStartTimestamp(uint64_t ref_event_id, uint64_t value);
80 void removeInquiryAggregationStartTimestamp(uint64_t ref_event_id);
81 std::unordered_map<uint64_t, uint64_t> getInquiryAggregationStartTimestampMap()
const;
83 void saveNumberOfAddressedDSNs(uint64_t ref_event_id, uint16_t value);
84 uint16_t loadNumberOfAddressedDSNs(uint64_t ref_event_id);
85 void updateNumberOfAddressedDSNs(uint64_t ref_event_id, uint16_t value);
86 void removeNumberOfAddressedDSNs(uint64_t ref_event_id);
88 void saveNumberOfAnsweredDSNs(uint64_t ref_event_id, uint16_t value);
89 uint16_t loadNumberOfAnsweredDSNs(uint64_t ref_event_id);
90 void updateNumberOfAnsweredDSNs(uint64_t ref_event_id, uint16_t value);
91 void removeNumberOfAnsweredDSNs(uint64_t ref_event_id);
93 void saveFindResultPromise(uint64_t ref_event_id, std::promise<FindResult> &&promise);
94 std::promise<FindResult> &loadFindResultPromise(uint64_t ref_event_id);
95 void removeFindResultPromise(uint64_t ref_event_id);
97 bool hasEvent(ProcedureKey key)
const;
98 bool hasNodeInfo(ProcedureKey key)
const;
100 bool hasFindQueryEvent(uint64_t ref_event_id)
const;
101 bool hasFindQueryUndecidedNodes(uint64_t ref_event_id)
const;
102 bool hasFindQueryPreliminaryResults(uint64_t ref_event_id)
const;
103 bool hasDSNAggregationStartTimestamp(uint64_t ref_event_id)
const;
104 bool hasInquiryAggregationStartTimestamp(uint64_t ref_event_id)
const;
105 bool hasNumberOfAddressedDSNs(uint64_t ref_event_id)
const;
106 bool hasNumberOfAnsweredDSNs(uint64_t ref_event_id)
const;
107 bool hasFindResultFuture(uint64_t ref_event_id)
const;
110 std::unordered_map<ProcedureKey, std::vector<minhton::NodeInfo>> map_;
111 std::unordered_map<ProcedureKey, uint64_t> event_ids_;
114 std::unordered_map<uint64_t, FindQuery> find_query_requests_;
117 std::unordered_map<uint64_t, std::vector<NodeInfo>> find_query_undecided_nodes_;
120 std::unordered_map<uint64_t, NodeData::NodesWithAttributes> find_query_preliminary_results_;
123 std::unordered_map<uint64_t, uint64_t> dsn_aggregation_start_timestamp_;
126 std::unordered_map<uint64_t, uint64_t> inquiry_aggregation_start_timestamp_;
129 std::unordered_map<uint64_t, uint16_t> number_of_addressed_dsns_;
132 std::unordered_map<uint64_t, uint16_t> number_of_answered_dsns_;
134 std::unordered_map<uint64_t, std::promise<FindResult>> find_result_promises_;