✅ 内测版通过测试

This commit is contained in:
shufeng2012 committed 2026-08-12 11:10:19 +08:00
1 parent 4d6e1e1fd4
commit 82875b3021
4 files changed
+149 -4

No files matched your search

+13
View File
@@ -4,6 +4,8 @@
#include <unordered_map>
#include <chrono>
#include <queue>
#include <set>
#include <optional>
@@ -35,11 +37,15 @@ private:
std::list <memdb_column> db;
std::unordered_map <T, index_keys> keys;
std::priority_queue <index_timestamp> time_touch;
std::multiset <index_timestamp> time_touch_;
size_t __size = 0;
int MAX_TIME = 60 * 10; // 10分钟
void flush();
void update_queue();
// 内测版
void flush_();
public:
using key_t = T;
@@ -61,4 +67,11 @@ public:
bool remove(key_t to_be_del_k);
bool update(key_t to_be_udt_k, value_t udt_v, bool need_to_udt_timetouch=false);
std::optional<U> search(key_t to_be_sch_k);
// 内测版
const std::multiset <index_timestamp>& get_time_touch_() const;
bool insert_(key_t to_be_ins_k, value_t ins_v);
bool remove_(key_t to_be_del_k);
bool update_(key_t to_be_udt_k, value_t udt_v, bool need_to_udt_timetouch=false);
std::optional<U> search_(key_t to_be_sch_k);
};