diff options
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h | 2 | ||||
-rw-r--r-- | vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h (renamed from vespalib/src/vespa/vespalib/datastore/unique_store_dictionary_base.h) | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.h | 10 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.hpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store_builder.h | 8 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h | 6 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp | 2 |
10 files changed, 23 insertions, 23 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h b/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h index 619b69ed8a6..3c324a30779 100644 --- a/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h +++ b/searchlib/src/vespa/searchlib/attribute/i_enum_store_dictionary.h @@ -38,7 +38,7 @@ struct CompareEnumIndex { /** * Interface for the dictionary used by an enum store. */ -class IEnumStoreDictionary : public datastore::UniqueStoreDictionaryBase { +class IEnumStoreDictionary : public datastore::IUniqueStoreDictionary { public: using EnumVector = EnumStoreEnumVector; using Index = EnumStoreIndex; diff --git a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp index 8b963dbf007..1ec89aea69e 100644 --- a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp +++ b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp @@ -32,7 +32,7 @@ public: struct DictionaryReadTest : public ::testing::Test { DefaultUniqueStoreDictionary dict; - UniqueStoreDictionaryBase::ReadSnapshot::UP snapshot; + IUniqueStoreDictionary::ReadSnapshot::UP snapshot; DictionaryReadTest() : dict(), diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary_base.h b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h index e09fdc6093c..cda62884318 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary_base.h +++ b/vespalib/src/vespa/vespalib/datastore/i_unique_store_dictionary.h @@ -15,7 +15,7 @@ class UniqueStoreAddResult; /** * Interface class for unique store dictionary. */ -class UniqueStoreDictionaryBase { +class IUniqueStoreDictionary { public: /** * Class that provides a read snapshot of the dictionary. @@ -34,7 +34,7 @@ public: }; using generation_t = vespalib::GenerationHandler::generation_t; - virtual ~UniqueStoreDictionaryBase() = default; + virtual ~IUniqueStoreDictionary() = default; virtual void freeze() = 0; virtual void transfer_hold_lists(generation_t generation) = 0; virtual void trim_hold_lists(generation_t firstUsed) = 0; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.h b/vespalib/src/vespa/vespalib/datastore/unique_store.h index bbf5f9c90a4..bf7808e9325 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.h @@ -5,14 +5,14 @@ #include "buffer_type.h" #include "bufferstate.h" #include "datastore.h" -#include "entryref.h" #include "entry_comparator_wrapper.h" +#include "entryref.h" +#include "i_compaction_context.h" +#include "i_unique_store_dictionary.h" #include "unique_store_add_result.h" -#include "unique_store_entry.h" #include "unique_store_allocator.h" #include "unique_store_comparator.h" -#include "unique_store_dictionary_base.h" -#include "i_compaction_context.h" +#include "unique_store_entry.h" namespace search::datastore { @@ -39,7 +39,7 @@ public: private: Allocator _allocator; DataStoreType &_store; - std::unique_ptr<UniqueStoreDictionaryBase> _dict; + std::unique_ptr<IUniqueStoreDictionary> _dict; using generation_t = vespalib::GenerationHandler::generation_t; public: diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp index 1ebdd65d87a..f1b60845403 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp @@ -82,7 +82,7 @@ private: EntryComparatorWrapper, DictionaryTraits>; DataStoreBase &_dataStore; - UniqueStoreDictionaryBase &_dict; + IUniqueStoreDictionary &_dict; ICompactable &_store; std::vector<uint32_t> _bufferIdsToCompact; std::vector<std::vector<EntryRef>> _mapping; @@ -121,7 +121,7 @@ private: public: CompactionContext(DataStoreBase &dataStore, - UniqueStoreDictionaryBase &dict, + IUniqueStoreDictionary &dict, ICompactable &store, std::vector<uint32_t> bufferIdsToCompact) : ICompactionContext(), diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h index 58ecf61eb82..a0e9f3d63a7 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.h @@ -6,7 +6,7 @@ namespace search::datastore { -class UniqueStoreDictionaryBase; +class IUniqueStoreDictionary; /** * Builder for related UniqueStore class. @@ -19,12 +19,12 @@ template <typename Allocator> class UniqueStoreBuilder { using EntryType = typename Allocator::EntryType; - Allocator &_allocator; - UniqueStoreDictionaryBase &_dict; + Allocator& _allocator; + IUniqueStoreDictionary& _dict; std::vector<EntryRef> _refs; std::vector<uint32_t> _refCounts; public: - UniqueStoreBuilder(Allocator& allocator, UniqueStoreDictionaryBase& dict, uint32_t uniqueValuesHint); + UniqueStoreBuilder(Allocator& allocator, IUniqueStoreDictionary& dict, uint32_t uniqueValuesHint); ~UniqueStoreBuilder(); void setupRefCounts(); void makeDictionary(); diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp index 030c8b6d6ba..7ea61f4e0ea 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_builder.hpp @@ -3,13 +3,13 @@ #pragma once #include "unique_store_builder.h" -#include "unique_store_dictionary_base.h" +#include "i_unique_store_dictionary.h" #include "datastore.hpp" namespace search::datastore { template <typename Allocator> -UniqueStoreBuilder<Allocator>::UniqueStoreBuilder(Allocator& allocator, UniqueStoreDictionaryBase& dict, uint32_t uniqueValuesHint) +UniqueStoreBuilder<Allocator>::UniqueStoreBuilder(Allocator& allocator, IUniqueStoreDictionary& dict, uint32_t uniqueValuesHint) : _allocator(allocator), _dict(dict), _refs(), diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h index cd13e88c77e..4ae32c45dea 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_dictionary.h @@ -1,7 +1,7 @@ // Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/btree/btree.h> -#include "unique_store_dictionary_base.h" +#include "i_unique_store_dictionary.h" #pragma once @@ -12,7 +12,7 @@ class EntryComparatorWrapper; /** * A dictionary for unique store. Mostly accessed via base class. */ -template <typename DictionaryT, typename ParentT = UniqueStoreDictionaryBase> +template <typename DictionaryT, typename ParentT = IUniqueStoreDictionary> class UniqueStoreDictionary : public ParentT { protected: using DictionaryType = DictionaryT; diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h index 3f260bfbc15..40cc295e76d 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.h @@ -2,7 +2,7 @@ #pragma once -#include "unique_store_dictionary_base.h" +#include "i_unique_store_dictionary.h" namespace search::datastore { @@ -19,12 +19,12 @@ public: using EnumValues = std::vector<std::vector<uint32_t>>; private: - UniqueStoreDictionaryBase::ReadSnapshot::UP _dict_snapshot; + IUniqueStoreDictionary::ReadSnapshot::UP _dict_snapshot; const DataStoreBase &_store; EnumValues _enumValues; uint32_t _next_enum_val; public: - UniqueStoreEnumerator(const UniqueStoreDictionaryBase &dict, const DataStoreBase &store); + UniqueStoreEnumerator(const IUniqueStoreDictionary &dict, const DataStoreBase &store); ~UniqueStoreEnumerator(); EntryRef get_frozen_root() const { return _dict_snapshot->get_frozen_root(); } void enumerateValue(EntryRef ref); diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp index 10ca0944519..8867a40228a 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_enumerator.hpp @@ -7,7 +7,7 @@ namespace search::datastore { template <typename RefT> -UniqueStoreEnumerator<RefT>::UniqueStoreEnumerator(const UniqueStoreDictionaryBase &dict, const DataStoreBase &store) +UniqueStoreEnumerator<RefT>::UniqueStoreEnumerator(const IUniqueStoreDictionary &dict, const DataStoreBase &store) : _dict_snapshot(dict.get_read_snapshot()), _store(store), _enumValues(), |