From e3b3916caea930b0a0d4025a1e6b4a04f767ceed Mon Sep 17 00:00:00 2001 From: Nobuhiro Ban Date: Thu, 20 Jun 2024 00:31:31 +0900 Subject: [PATCH] rename from touch() to increment_version() --- ...terface_touch.h => interface_increment_version.h} | 12 ++++++------ include/kvs.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) rename include/{interface_touch.h => interface_increment_version.h} (93%) diff --git a/include/interface_touch.h b/include/interface_increment_version.h similarity index 93% rename from include/interface_touch.h rename to include/interface_increment_version.h index 77ded70..a8330cc 100644 --- a/include/interface_touch.h +++ b/include/interface_increment_version.h @@ -1,5 +1,5 @@ /** - * @file interface_touch.h + * @file interface_increment_version.h */ #pragma once @@ -18,8 +18,8 @@ namespace yakushima { // begin - forward declaration // end - forward declaration -[[maybe_unused]] static status touch(tree_instance* ti, // NOLINT - std::string_view key_view) { +[[maybe_unused]] static status increment_version(tree_instance* ti, // NOLINT + std::string_view key_view) { retry_from_root: base_node* root = ti->load_root_ptr(); if (root == nullptr) { @@ -167,12 +167,12 @@ namespace yakushima { goto retry_find_border; // NOLINT } -[[maybe_unused]] static status touch(std::string_view storage_name, // NOLINT - std::string_view key_view) { +[[maybe_unused]] static status increment_version(std::string_view storage_name, // NOLINT + std::string_view key_view) { tree_instance* ti{}; status ret{storage::find_storage(storage_name, &ti)}; if (status::OK != ret) { return status::WARN_STORAGE_NOT_EXIST; } - return touch(ti, key_view); + return increment_version(ti, key_view); } } // namespace yakushima \ No newline at end of file diff --git a/include/kvs.h b/include/kvs.h index 7605f89..2b2108a 100644 --- a/include/kvs.h +++ b/include/kvs.h @@ -12,10 +12,10 @@ #include "interface_display.h" #include "interface_get.h" #include "interface_helper.h" +#include "interface_increment_version.h" #include "interface_put.h" #include "interface_remove.h" #include "interface_scan.h" -#include "interface_touch.h" #include "storage.h" #include "storage_impl.h" @@ -221,8 +221,8 @@ put(Token token, std::string_view storage_name, // NOLINT * @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation * does not exist. */ -[[maybe_unused]] static status touch(std::string_view storage_name, // NOLINT - std::string_view key_view); +[[maybe_unused]] static status increment_version(std::string_view storage_name, // NOLINT + std::string_view key_view); /** * TODO : add new 3 modes : try-mode : 1 trial : wait-mode : try until success : mid-mode