Everett
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
everett::runtime_store< P, Ids, Ops, Family > Struct Template Reference

#include <runtime_store.h>

Classes

struct  persisted
 
struct  pinned_resolver
 
struct  resolver
 
struct  roots
 

Public Types

using policy_type = P
 
using family_type = Family
 
using codec_type = runtime_storage_codec< Family >
 
using snapshot_type = typename Family::snapshot_type
 
using stored_type = stored_runtime< P, Family >
 
using node_type = typename Family::node_type
 
using native_type = typename Family::native_type
 
using pair_type = typename node_type::pair_type
 
using native_pointer = typename node_type::native_pointer
 
using mapped_pointer = decltype(std::declval< node_type const & >().mapped())
 
using mapped_type = std::remove_const_t< typename mapped_pointer::element_type >
 
using mapped_resolver = mapped_cola_resolver< P, mapped_type >
 
using catalog_type = sqlite_catalog< P, Ops >
 

Public Member Functions

 runtime_store (runtime_store const &)=delete
 
runtime_store & operator= (runtime_store const &)=delete
 
 runtime_store (runtime_store &&) noexcept(std::is_nothrow_move_constructible_v< Ids >)=default
 
runtime_store & operator= (runtime_store &&)=delete
 
bool failed () const noexcept
 
std::filesystem::path const & root () const &noexcept
 
std::filesystem::path const & root () const &&=delete
 
std::optional< stored_type > find (std::string_view name)
 
std::optional< stored_type > find_save (std::string_view name)
 
void prepare (snapshot_type const &source)
 
stored_type create_session (std::string_view name, snapshot_type const &source, std::span< std::byte const > semantic={})
 
stored_type publish (catalog_session_head const &expected, snapshot_type const &source, std::span< std::byte const > semantic={})
 
stored_type fork (std::string_view name, catalog_session_head const &source)
 
void save (std::string_view name, catalog_session_head const &source)
 
std::string const & last_operation () const noexcept
 

Static Public Member Functions

static runtime_store create (std::filesystem::path const &root, Ids ids={}, catalog_options options={}, Ops ops={})
 
static runtime_store open (std::filesystem::path const &root, Ids ids={}, catalog_options options={}, Ops ops={})
 

Private Types

using registry_type = runtime_store_detail::runtime_registry< node_type >
 

Private Member Functions

 runtime_store (catalog_type catalog, Ids ids)
 
void require_active () const
 
std::string operation ()
 
auto sealer ()
 
stored_type decode_retained (catalog_session_head head)
 
stored_type restore (catalog_session_head head, snapshot_type const *source=nullptr)
 
persisted persist (snapshot_type const &source)
 

Static Private Member Functions

template<class Resolver >
static std::optional< roots > retained_roots (catalog_session_head const &head, Resolver &loaded)
 

Private Attributes

registry_type retained_
 
catalog_type catalog_
 
Ids ids_
 
bool failed_ = false
 
std::string last_operation_
 

Member Typedef Documentation

◆ catalog_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::catalog_type = sqlite_catalog<P, Ops>

◆ codec_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::codec_type = runtime_storage_codec<Family>

◆ family_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::family_type = Family

◆ mapped_pointer

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::mapped_pointer = decltype(std::declval<node_type const &>().mapped())

◆ mapped_resolver

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::mapped_resolver = mapped_cola_resolver<P, mapped_type>

◆ mapped_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::mapped_type = std::remove_const_t<typename mapped_pointer::element_type>

◆ native_pointer

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::native_pointer = typename node_type::native_pointer

◆ native_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::native_type = typename Family::native_type

◆ node_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::node_type = typename Family::node_type

◆ pair_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::pair_type = typename node_type::pair_type

◆ policy_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::policy_type = P

◆ registry_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::registry_type = runtime_store_detail::runtime_registry<node_type>
private

◆ snapshot_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::snapshot_type = typename Family::snapshot_type

◆ stored_type

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
using everett::runtime_store< P, Ids, Ops, Family >::stored_type = stored_runtime<P, Family>

Constructor & Destructor Documentation

◆ runtime_store() [1/3]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
everett::runtime_store< P, Ids, Ops, Family >::runtime_store ( runtime_store< P, Ids, Ops, Family > const &  )
delete

◆ runtime_store() [2/3]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
everett::runtime_store< P, Ids, Ops, Family >::runtime_store ( runtime_store< P, Ids, Ops, Family > &&  ) const
defaultnoexcept

◆ runtime_store() [3/3]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
everett::runtime_store< P, Ids, Ops, Family >::runtime_store ( catalog_type  catalog,
Ids  ids 
)
inlineprivate

Member Function Documentation

◆ create()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
static runtime_store everett::runtime_store< P, Ids, Ops, Family >::create ( std::filesystem::path const &  root,
Ids  ids = {},
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ create_session()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
stored_type everett::runtime_store< P, Ids, Ops, Family >::create_session ( std::string_view  name,
snapshot_type const &  source,
std::span< std::byte const >  semantic = {} 
)
inline

◆ decode_retained()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
stored_type everett::runtime_store< P, Ids, Ops, Family >::decode_retained ( catalog_session_head  head)
inlineprivate

◆ failed()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
bool everett::runtime_store< P, Ids, Ops, Family >::failed ( ) const
inlinenoexcept

◆ find()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::optional< stored_type > everett::runtime_store< P, Ids, Ops, Family >::find ( std::string_view  name)
inline

◆ find_save()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::optional< stored_type > everett::runtime_store< P, Ids, Ops, Family >::find_save ( std::string_view  name)
inline

◆ fork()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
stored_type everett::runtime_store< P, Ids, Ops, Family >::fork ( std::string_view  name,
catalog_session_head const &  source 
)
inline

◆ last_operation()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::string const & everett::runtime_store< P, Ids, Ops, Family >::last_operation ( ) const
inlinenoexcept

◆ open()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
static runtime_store everett::runtime_store< P, Ids, Ops, Family >::open ( std::filesystem::path const &  root,
Ids  ids = {},
catalog_options  options = {},
Ops  ops = {} 
)
inlinestatic

◆ operation()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::string everett::runtime_store< P, Ids, Ops, Family >::operation ( )
inlineprivate

◆ operator=() [1/2]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
runtime_store & everett::runtime_store< P, Ids, Ops, Family >::operator= ( runtime_store< P, Ids, Ops, Family > &&  )
delete

◆ operator=() [2/2]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
runtime_store & everett::runtime_store< P, Ids, Ops, Family >::operator= ( runtime_store< P, Ids, Ops, Family > const &  )
delete

◆ persist()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
persisted everett::runtime_store< P, Ids, Ops, Family >::persist ( snapshot_type const &  source)
inlineprivate

◆ prepare()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
void everett::runtime_store< P, Ids, Ops, Family >::prepare ( snapshot_type const &  source)
inline

◆ publish()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
stored_type everett::runtime_store< P, Ids, Ops, Family >::publish ( catalog_session_head const &  expected,
snapshot_type const &  source,
std::span< std::byte const >  semantic = {} 
)
inline

◆ require_active()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
void everett::runtime_store< P, Ids, Ops, Family >::require_active ( ) const
inlineprivate

◆ restore()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
stored_type everett::runtime_store< P, Ids, Ops, Family >::restore ( catalog_session_head  head,
snapshot_type const *  source = nullptr 
)
inlineprivate

◆ retained_roots()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
template<class Resolver >
static std::optional< roots > everett::runtime_store< P, Ids, Ops, Family >::retained_roots ( catalog_session_head const &  head,
Resolver &  loaded 
)
inlinestaticprivate

◆ root() [1/2]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::filesystem::path const & everett::runtime_store< P, Ids, Ops, Family >::root ( ) const &&
delete

◆ root() [2/2]

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::filesystem::path const & everett::runtime_store< P, Ids, Ops, Family >::root ( ) const &
inlinenoexcept

◆ save()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
void everett::runtime_store< P, Ids, Ops, Family >::save ( std::string_view  name,
catalog_session_head const &  source 
)
inline

◆ sealer()

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
auto everett::runtime_store< P, Ids, Ops, Family >::sealer ( )
inlineprivate

Member Data Documentation

◆ catalog_

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
catalog_type everett::runtime_store< P, Ids, Ops, Family >::catalog_
private

◆ failed_

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
bool everett::runtime_store< P, Ids, Ops, Family >::failed_ = false
private

◆ ids_

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
Ids everett::runtime_store< P, Ids, Ops, Family >::ids_
private

◆ last_operation_

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
std::string everett::runtime_store< P, Ids, Ops, Family >::last_operation_
private

◆ retained_

template<class P , class Ids = random_object_ids, class Ops = sqlite_catalog_ops, class Family = binary_runtime_family<P>>
registry_type everett::runtime_store< P, Ids, Ops, Family >::retained_
private

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