summaryrefslogtreecommitdiffstats
path: root/include/framework/ShardInterface.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-05-17 16:00:20 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-05-17 16:00:20 -0400
commit6fd50506d2e50d2faf2478a2883a2ef1b4840a78 (patch)
treeeb29955b435a6e2e6196b9c89de15c6b8885c4f3 /include/framework/ShardInterface.h
parent75a8418b580234521b5fa23340bee959c357acf9 (diff)
downloaddynamic-extension-6fd50506d2e50d2faf2478a2883a2ef1b4840a78.tar.gz
Started implementing shard interface (not finished yet)
Diffstat (limited to 'include/framework/ShardInterface.h')
-rw-r--r--include/framework/ShardInterface.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/framework/ShardInterface.h b/include/framework/ShardInterface.h
new file mode 100644
index 0000000..5d07a99
--- /dev/null
+++ b/include/framework/ShardInterface.h
@@ -0,0 +1,27 @@
+/*
+ * include/shard/ShardInterface.h
+ *
+ * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu>
+ *
+ * All rights reserved. Published under the Modified BSD License.
+ *
+ */
+#pragma once
+
+#include <concepts>
+
+#include "util/types.h"
+
+template <typename S>
+concept ShardInterface = requires(S s, void *p) {
+ //s.point_lookup();
+ //s.tombstone_lookup();
+ //s.delete_record();
+
+ {s.get_query_state(p)} -> std::convertible_to<void*>;
+ {s.delete_query_state(p)};
+
+ {s.get_record_count()} -> std::convertible_to<size_t>;
+ {s.get_tombstone_count()} -> std::convertible_to<size_t>;
+ {s.get_memory_usage()} -> std::convertible_to<size_t>;
+};