Everett
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
everett::typed_engine< P, A, DepthLimit, Family > Struct Template Reference

#include <typed_world.h>

Public Types

using policy_type = P
 
using world_type = typed_world< P, A, Family >
 
using contribution_type = typed_contribution< P, A, Family >
 
using metadata_type = typed_world_metadata< A >
 
using runtime_family = Family
 
using key_transport = typed_detail::transport_t< P, Family >
 
using compose_type = std::conditional_t< typed_detail::all_replacements< typename registry_detail::info< typename P::registry_type >::leaves >::value, typed_detail::replacement_compose< P, key_transport >, typed_detail::compose< P, key_transport > >
 
using runtime_type = typename Family::template runtime_type< compose_type >
 

Public Member Functions

 typed_engine (std::string schema_id=default_schema())
 
void rebase (world_type state)
 
world_type snapshot () const
 
auto storage () const
 
bool pending () const noexcept
 
bool failed () const noexcept
 
void poison () noexcept
 
bool admission_ready () const noexcept
 
auto work () const
 
std::optional< world_type > advance (std::uint64_t budget)
 
world_type contribute (contribution_type input)
 

Static Public Member Functions

static typed_engine from_snapshot (world_type state)
 
template<class Storage >
requires requires { runtime_type::from_snapshot(state.runtime(), std::move(storage)); }
static typed_engine from_snapshot (world_type state, Storage storage)
 
static typed_batch< P, A, Family > batch ()
 
template<class S = typed_detail::default_sort_t<P>>
static contribution_type change (typed_detail::key_t< S > const &key, typed_detail::arrow_t< S > const &arrow)
 
template<class S = typed_detail::default_sort_t<P>>
requires typed_detail::replacement<S>
static contribution_type put (typed_detail::key_t< S > const &key, typed_detail::state_t< S > const &value)
 
template<class S = typed_detail::default_sort_t<P>>
requires typed_detail::replacement<S>
static contribution_type erase (typed_detail::key_t< S > const &key)
 
static std::uint64_t reservation_work (std::uint64_t records)
 
static session_reservation reservation (contribution_type const &input)
 

Static Public Attributes

static constexpr bool charged_service = requires { runtime_type::service_budget(std::uint64_t{}); }
 
static constexpr std::uint64_t ready_admission_allowance
 
static constexpr std::uint64_t admission_allowance
 

Private Member Functions

template<class F >
void visit_changes (contribution_type &input, F &&visit) const
 
metadata_type prepare (contribution_type &input) const
 
template<class S >
void contribute_validated (profile_record const &record, typed_detail::key_t< S > const &key, typed_detail::state_t< S > const &old, typed_detail::state_t< S > const &next)
 
void complete (std::span< profile_record const > records, metadata_type metadata)
 
bool initialize (contribution_type const &input, metadata_type const &metadata)
 
 typed_engine (world_type state)
 
template<class Storage >
 typed_engine (world_type state, Storage storage)
 
void require_active () const
 

Static Private Member Functions

template<class S >
static void delta (metadata_type &metadata, typed_detail::key_t< S > const &key, typed_detail::state_t< S > const &old, typed_detail::state_t< S > const &next)
 
static void require_depth (typename world_type::runtime_snapshot const &state)
 
static auto checked_snapshot (typename world_type::runtime_snapshot state)
 
static std::string default_schema ()
 
static std::string checked_schema (std::string value)
 

Private Attributes

runtime_type runtime_
 
world_type current_
 
bool failed_ = false
 

Friends

template<class , class , std::uint64_t , class >
struct replacement_rebuild_engine
 

Member Typedef Documentation

◆ compose_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::compose_type = std::conditional_t<typed_detail::all_replacements< typename registry_detail::info<typename P::registry_type>::leaves>::value, typed_detail::replacement_compose<P, key_transport>, typed_detail::compose<P, key_transport> >

◆ contribution_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::contribution_type = typed_contribution<P, A, Family>

◆ key_transport

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::key_transport = typed_detail::transport_t<P, Family>

◆ metadata_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::metadata_type = typed_world_metadata<A>

◆ policy_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::policy_type = P

◆ runtime_family

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::runtime_family = Family

◆ runtime_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::runtime_type = typename Family::template runtime_type<compose_type>

◆ world_type

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
using everett::typed_engine< P, A, DepthLimit, Family >::world_type = typed_world<P, A, Family>

Constructor & Destructor Documentation

◆ typed_engine() [1/3]

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
everett::typed_engine< P, A, DepthLimit, Family >::typed_engine ( std::string  schema_id = default_schema())
inlineexplicit

◆ typed_engine() [2/3]

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
everett::typed_engine< P, A, DepthLimit, Family >::typed_engine ( world_type  state)
inlineexplicitprivate

◆ typed_engine() [3/3]

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class Storage >
everett::typed_engine< P, A, DepthLimit, Family >::typed_engine ( world_type  state,
Storage  storage 
)
inlineprivate

Member Function Documentation

◆ admission_ready()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
bool everett::typed_engine< P, A, DepthLimit, Family >::admission_ready ( ) const
inlinenoexcept

◆ advance()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
std::optional< world_type > everett::typed_engine< P, A, DepthLimit, Family >::advance ( std::uint64_t  budget)
inline

◆ batch()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static typed_batch< P, A, Family > everett::typed_engine< P, A, DepthLimit, Family >::batch ( )
inlinestatic

◆ change()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class S = typed_detail::default_sort_t<P>>
static contribution_type everett::typed_engine< P, A, DepthLimit, Family >::change ( typed_detail::key_t< S > const &  key,
typed_detail::arrow_t< S > const &  arrow 
)
inlinestatic

◆ checked_schema()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static std::string everett::typed_engine< P, A, DepthLimit, Family >::checked_schema ( std::string  value)
inlinestaticprivate

◆ checked_snapshot()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static auto everett::typed_engine< P, A, DepthLimit, Family >::checked_snapshot ( typename world_type::runtime_snapshot  state)
inlinestaticprivate

◆ complete()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
void everett::typed_engine< P, A, DepthLimit, Family >::complete ( std::span< profile_record const >  records,
metadata_type  metadata 
)
inlineprivate

◆ contribute()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
world_type everett::typed_engine< P, A, DepthLimit, Family >::contribute ( contribution_type  input)
inline

◆ contribute_validated()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class S >
void everett::typed_engine< P, A, DepthLimit, Family >::contribute_validated ( profile_record const &  record,
typed_detail::key_t< S > const &  key,
typed_detail::state_t< S > const &  old,
typed_detail::state_t< S > const &  next 
)
inlineprivate

◆ default_schema()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static std::string everett::typed_engine< P, A, DepthLimit, Family >::default_schema ( )
inlinestaticprivate

◆ delta()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class S >
static void everett::typed_engine< P, A, DepthLimit, Family >::delta ( metadata_type &  metadata,
typed_detail::key_t< S > const &  key,
typed_detail::state_t< S > const &  old,
typed_detail::state_t< S > const &  next 
)
inlinestaticprivate

◆ erase()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class S = typed_detail::default_sort_t<P>>
requires typed_detail::replacement<S>
static contribution_type everett::typed_engine< P, A, DepthLimit, Family >::erase ( typed_detail::key_t< S > const &  key)
inlinestatic

◆ failed()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
bool everett::typed_engine< P, A, DepthLimit, Family >::failed ( ) const
inlinenoexcept

◆ from_snapshot() [1/2]

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static typed_engine everett::typed_engine< P, A, DepthLimit, Family >::from_snapshot ( world_type  state)
inlinestatic

◆ from_snapshot() [2/2]

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class Storage >
requires requires { runtime_type::from_snapshot(state.runtime(), std::move(storage)); }
static typed_engine everett::typed_engine< P, A, DepthLimit, Family >::from_snapshot ( world_type  state,
Storage  storage 
)
inlinestatic

◆ initialize()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
bool everett::typed_engine< P, A, DepthLimit, Family >::initialize ( contribution_type const &  input,
metadata_type const &  metadata 
)
inlineprivate

◆ pending()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
bool everett::typed_engine< P, A, DepthLimit, Family >::pending ( ) const
inlinenoexcept

◆ poison()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
void everett::typed_engine< P, A, DepthLimit, Family >::poison ( )
inlinenoexcept

◆ prepare()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
metadata_type everett::typed_engine< P, A, DepthLimit, Family >::prepare ( contribution_type &  input) const
inlineprivate

◆ put()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class S = typed_detail::default_sort_t<P>>
requires typed_detail::replacement<S>
static contribution_type everett::typed_engine< P, A, DepthLimit, Family >::put ( typed_detail::key_t< S > const &  key,
typed_detail::state_t< S > const &  value 
)
inlinestatic

◆ rebase()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
void everett::typed_engine< P, A, DepthLimit, Family >::rebase ( world_type  state)
inline

◆ require_active()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
void everett::typed_engine< P, A, DepthLimit, Family >::require_active ( ) const
inlineprivate

◆ require_depth()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static void everett::typed_engine< P, A, DepthLimit, Family >::require_depth ( typename world_type::runtime_snapshot const &  state)
inlinestaticprivate

◆ reservation()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static session_reservation everett::typed_engine< P, A, DepthLimit, Family >::reservation ( contribution_type const &  input)
inlinestatic

◆ reservation_work()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
static std::uint64_t everett::typed_engine< P, A, DepthLimit, Family >::reservation_work ( std::uint64_t  records)
inlinestatic

◆ snapshot()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
world_type everett::typed_engine< P, A, DepthLimit, Family >::snapshot ( ) const
inline

◆ storage()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
auto everett::typed_engine< P, A, DepthLimit, Family >::storage ( ) const
inline

◆ visit_changes()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class F >
void everett::typed_engine< P, A, DepthLimit, Family >::visit_changes ( contribution_type &  input,
F &&  visit 
) const
inlineprivate

◆ work()

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
auto everett::typed_engine< P, A, DepthLimit, Family >::work ( ) const
inline

Friends And Related Symbol Documentation

◆ replacement_rebuild_engine

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
template<class , class , std::uint64_t , class >
friend struct replacement_rebuild_engine
friend

Member Data Documentation

◆ admission_allowance

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
constexpr std::uint64_t everett::typed_engine< P, A, DepthLimit, Family >::admission_allowance
staticconstexpr
Initial value:
= [] {
if constexpr (charged_service)
return ready_admission_allowance + runtime_type::local_charge_bound * 8 * (runtime_type::maximum_levels + 2);
}()
static constexpr std::uint64_t ready_admission_allowance
Definition typed_world.h:418
static constexpr bool charged_service
Definition typed_world.h:417

◆ charged_service

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
constexpr bool everett::typed_engine< P, A, DepthLimit, Family >::charged_service = requires { runtime_type::service_budget(std::uint64_t{}); }
staticconstexpr

◆ current_

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
world_type everett::typed_engine< P, A, DepthLimit, Family >::current_
private

◆ failed_

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
bool everett::typed_engine< P, A, DepthLimit, Family >::failed_ = false
private

◆ ready_admission_allowance

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
constexpr std::uint64_t everett::typed_engine< P, A, DepthLimit, Family >::ready_admission_allowance
staticconstexpr
Initial value:
= [] {
if constexpr (charged_service) return 2 * runtime_type::local_charge_bound + 16 * DepthLimit + 512;
else return 2 * P::group_size + 128 + DepthLimit + 32;
}()

◆ runtime_

template<class P = storage_policy<>, class A = wrapping_fingerprint_algebra, std::uint64_t DepthLimit = 256, class Family = binary_runtime_family<P>>
runtime_type everett::typed_engine< P, A, DepthLimit, Family >::runtime_
private

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