|
LLFIO v2.00
|
The kv store namespace. More...
Namespaces | |
| namespace | traits |
| Traits. | |
Classes | |
| struct | basic_key_value_store_info |
| Information about an available key value store implementation. More... | |
| class | basic_key_value_store |
| A possibly hardware-implemented basic key-value store. More... | |
Typedefs | |
| template<class T> | |
| using | span = llfio::span<T> |
| template<class T> | |
| using | result = llfio::result<T> |
Enumerations | |
| enum class | kvstore_errc { success = 0 , invalid_uri , unsupported_uri , unsupported_integrity , transaction_aborted_collision } |
Functions | |
| result< basic_key_value_store > | create_kvstore (const basic_key_value_store::uri_type &uri, basic_key_value_store::size_type key_size, basic_key_value_store::features _features, basic_key_value_store::mode _mode=basic_key_value_store::mode::write, basic_key_value_store::creation _creation=basic_key_value_store::creation::if_needed, basic_key_value_store::caching _caching=basic_key_value_store::caching::all) |
| Create a new key value store, or open or truncate an existing key value store, using the given URI. | |
| result< basic_key_value_store > | open_kvstore (const basic_key_value_store::uri_type &uri, basic_key_value_store::mode _mode=basic_key_value_store::mode::write, basic_key_value_store::caching _caching=basic_key_value_store::caching::all) |
| Open an existing key value store. A convenience overload for create_kvstore(). | |
| result< span< basic_key_value_store_info > > | enumerate_kvstores (span< basic_key_value_store_info > lst) |
| Fill an array with information about all the key value stores available to this process. | |
The kv store namespace.
|
strong |
The error codes specific to basic_key_value_store. Note the std::errc equivalent codes may also be returned e.g. std::errc::insufficient_disk_space.
|
extern |
Create a new key value store, or open or truncate an existing key value store, using the given URI.
Query the system and/or process registry of key value store providers for an implementation capable of using a store at uri with the specified key size and features. Guaranteed built-in providers are:
file:// based providers:
Inside the file monotonic is a 64 bit monotonic count representing time. Updated values are kept at store/01234/5678/90ab/cdef/values/count, where the monotonic count is atomically incremented every update. store/01234/5678/90ab/cdef/deltas is where 4Kb update deltas are kept if the value is larger than 64Kb. store/01234/5678/90ab/cdef/latest is the count of the latest value, its size, and if deltas need to be applied.
URIs may of course specify other sources of key value store than on the file system. Third parties may have registered system-wide implementations available to all programs. The local process may have registered additional implementations as well.