LLVM: llvm::cas::ondisk::OnDiskKeyValueDB Class Reference (original) (raw)

An on-disk key-value data store with the following properties: More...

#include "[llvm/CAS/OnDiskKeyValueDB.h](OnDiskKeyValueDB%5F8h%5Fsource.html)"

Public Types
using CheckValueT
Public Member Functions
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)
size_t getStorageSize () const
unsigned getHardStorageLimitUtilization () const
LLVM_ABI_FOR_TEST Error validate (CheckValueT CheckValue) const
Validate the storage with a callback CheckValue to check the stored value.

An on-disk key-value data store with the following properties:

Definition at line 29 of file OnDiskKeyValueDB.h.

CheckValueT

Initial value:

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

FileOffset is a wrapper around uint64_t to represent the offset of data from the beginning of the fil...

An efficient, type-erasing, non-owning reference to a callable.

FunctionAddr VTableAddr uintptr_t uintptr_t Data

Definition at line 74 of file OnDiskKeyValueDB.h.

get()

getHardStorageLimitUtilization()

unsigned llvm::cas::ondisk::OnDiskKeyValueDB::getHardStorageLimitUtilization ( ) const inline

Returns

The precentage of space utilization of hard space limits.

Return value is an integer between 0 and 100 for percentage.

Definition at line 53 of file OnDiskKeyValueDB.h.

getStorageSize()

size_t llvm::cas::ondisk::OnDiskKeyValueDB::getStorageSize ( ) const inline

open()

put()

Associate a value with a key.

Parameters

Key the hash bytes for the key
Value the value bytes, same size as ValueSize parameter of open call.

Returns

the value associated with the Key. It may be different than [Value](classllvm%5F1%5F1Value.html "LLVM Value Representation.") if another value is already associated with this key.

Definition at line 35 of file OnDiskKeyValueDB.cpp.

References assert(), llvm::copy(), llvm::createStringError(), llvm::cas::OnDiskTrieRawHashMap::ValueProxy::Data, llvm::MutableArrayRef< T >::data(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::invalid_argument, llvm::itostr(), LLVM_UNLIKELY, and llvm::ArrayRef< T >::size().

validate()

Error OnDiskKeyValueDB::validate ( CheckValueT CheckValue ) const

The documentation for this class was generated from the following files: