15#ifndef LLVM_CAS_ONDISKKEYVALUEDB_H
16#define LLVM_CAS_ONDISKKEYVALUEDB_H
29class OnDiskKeyValueDB {
54 return Cache.size() * 100ULL / Cache.capacity();
73 std::shared_ptr<OnDiskCASLogger>
Logger =
nullptr);
81 : ValueSize(ValueSize), Cache(
std::
move(Cache)),
82 UnifiedCache(UnifiedCache) {}
84 const size_t ValueSize;
86 UnifiedOnDiskCache *UnifiedCache =
nullptr;
#define LLVM_ABI_FOR_TEST
This file declares interface for OnDiskTrieRawHashMap, a thread-safe and (mostly) lock-free hash map ...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Logging utility - given an ordered specification of features, and assuming a scalar reward,...
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
OnDiskTrieRawHashMap is a persistent trie data structure used as hash maps.
An on-disk key-value data store with the following properties:
static LLVM_ABI_FOR_TEST Expected< std::unique_ptr< OnDiskKeyValueDB > > open(StringRef Path, StringRef HashName, unsigned KeySize, StringRef ValueName, size_t ValueSize, UnifiedOnDiskCache *UnifiedCache=nullptr, std::shared_ptr< OnDiskCASLogger > Logger=nullptr)
Open the on-disk store from a directory.
LLVM_ABI_FOR_TEST Expected< ArrayRef< char > > put(ArrayRef< uint8_t > Key, ArrayRef< char > Value)
Associate a value with a key.
LLVM_ABI_FOR_TEST Expected< std::optional< ArrayRef< char > > > get(ArrayRef< uint8_t > Key)
LLVM_ABI_FOR_TEST Error validate() const
Validate the storage.
size_t getStorageSize() const
unsigned getHardStorageLimitUtilization() const
A unified CAS nodes and key-value database, using on-disk storage for both.
StringMapEntry< Value * > ValueName
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.