LLFIO  v2.00
kvstore_v1_xxx::basic_key_value_store_info Struct Reference

Information about an available key value store implementation. More...

#include "kvstore.hpp"

Public Types

enum  bitfield__features : unsigned {
  none = 1U << 0U , shared_memory = 1U << 1U , history = 1U << 2U , stable_values = 1U << 3U ,
  stable_keys = 1U << 4U , update_deltas = 1U << 5U , atomic_snapshots = 1U << 6U , atomic_transactions = 1U << 7U
}
 Features requested, or provided by, this store. More...
 
using uri_type = std::basic_string< char >
 The type of the UTF-8 URI used by this store.
 
using extent_type = llfio::file_handle::extent_type
 The value extent type used by this store.
 
using size_type = llfio::file_handle::size_type
 The memory extent type used by this store.
 
using handle_type = llfio::file_handle
 The handle type used by this store.
 
using mode = handle_type::mode
 The mode used by this store.
 
using creation = handle_type::creation
 The creation used by this store.
 
using caching = handle_type::caching
 The kernel caching used by this store.
 

Public Attributes

const char * name
 The name of this store implementation.
 
size_type min_key_size
 The minimum key size, in bytes, supported.
 
size_type max_key_size
 The maximum key size, in bytes, supported.
 
extent_type min_value_size
 The minimum value size, in bytes, supported.
 
extent_type max_value_size
 
features features
 The features this store implementation provides.
 
int(* score )(const uri_type &uri, handle_type::mode, handle_type::creation creation)
 
result< basic_key_value_store >(* create )(const basic_key_value_store::uri_type &uri, size_type key_size, features _features, mode _mode, creation _creation, caching _caching)
 

Detailed Description

Information about an available key value store implementation.

Member Enumeration Documentation

◆ bitfield__features

Features requested, or provided by, this store.

Enumerator
none 

Bare key-value store. Very likely to choose a hardware implementation, if one is available.

shared_memory 

Use a single shared memory region for storage. Note that keys and value sizes freeze after URI fetch.

history 

A certain amount of history of previous valid states of the store is kept such that a previously valid state can always be restored after sudden power loss.

stable_values 

Updates do not appear to modify any pinned value.

stable_keys 

Updates do not appear to remove any pinned keys.

update_deltas 

In-place partial updates are recorded as change deltas.

atomic_snapshots 

The ability to pin the value of more than one key in an atomic snapshot.

atomic_transactions 

The ability to update many items with dependencies on other items as a single, all-or-nothing, change.

228  {
229  none = 1U << 0U, //!< Bare key-value store. Very likely to choose a hardware implementation, if one is available.
230  shared_memory = 1U << 1U, //!< Use a single shared memory region for storage. Note that keys and value sizes freeze after URI fetch.
231  history = 1U << 2U, //!< A certain amount of history of previous valid states of the store is kept such that a previously valid state can always be restored after sudden power loss.
232  stable_values = 1U << 3U, //!< Updates do not appear to modify any pinned value.
233  stable_keys = 1U << 4U, //!< Updates do not appear to remove any pinned keys.
234  update_deltas = 1U << 5U, //!< In-place partial updates are recorded as change deltas.
235  atomic_snapshots = 1U << 6U, //!< The ability to pin the value of more than one key in an atomic snapshot.
236  atomic_transactions = 1U << 7U //!< The ability to update many items with dependencies on other items as a single, all-or-nothing, change.
237  }
@ stable_keys
Updates do not appear to remove any pinned keys.
Definition: kvstore.hpp:233
@ atomic_transactions
The ability to update many items with dependencies on other items as a single, all-or-nothing,...
Definition: kvstore.hpp:236
@ history
A certain amount of history of previous valid states of the store is kept such that a previously vali...
Definition: kvstore.hpp:231
@ atomic_snapshots
The ability to pin the value of more than one key in an atomic snapshot.
Definition: kvstore.hpp:235
@ shared_memory
Use a single shared memory region for storage. Note that keys and value sizes freeze after URI fetch.
Definition: kvstore.hpp:230
@ update_deltas
In-place partial updates are recorded as change deltas.
Definition: kvstore.hpp:234
@ none
Bare key-value store. Very likely to choose a hardware implementation, if one is available.
Definition: kvstore.hpp:229
@ stable_values
Updates do not appear to modify any pinned value.
Definition: kvstore.hpp:232

Member Data Documentation

◆ create

result<basic_key_value_store>(* kvstore_v1_xxx::basic_key_value_store_info::create) (const basic_key_value_store::uri_type &uri, size_type key_size, features _features, mode _mode, creation _creation, caching _caching)

Construct a store implementation.

◆ max_value_size

extent_type kvstore_v1_xxx::basic_key_value_store_info::max_value_size

The maximum value size, in bytes, supported.

◆ score

int(* kvstore_v1_xxx::basic_key_value_store_info::score) (const uri_type &uri, handle_type::mode, handle_type::creation creation)

Examine the specified URI for suitability for this store implementation. Zero means that the URI location is suitable, but the format at that location is not compatible. Negative means the URI location is not possible. Higher positive scores outrank other positive scores.


The documentation for this struct was generated from the following file: