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

#include <cola_runtime.h>

Classes

struct  continuation
 
struct  execution
 

Public Types

using policy_type = P
 
using snapshot_type = cola_runtime_snapshot< P >
 
using node_type = cola_runtime_node< P >
 
using native_type = cola_runtime_native< P >
 
using native_pointer = typename node_type::native_pointer
 
using pair_type = typename node_type::pair_type
 
using run_type = cola_runtime_run< P >
 
using query_type = typename snapshot_type::query_type
 

Public Member Functions

 cola_runtime (Compose compose={})
 
 cola_runtime (cola_runtime const &)=delete
 
cola_runtime & operator= (cola_runtime const &)=delete
 
 cola_runtime (cola_runtime &&) noexcept=default
 
cola_runtime & operator= (cola_runtime &&) noexcept=default
 
snapshot_type snapshot () const
 
bool pending () const noexcept
 
bool admission_ready () const noexcept
 
std::uint64_t next_service_cost () const
 
std::uint64_t admission_cost () const
 
std::optional< snapshot_type > try_contribute (profile_record const &record, std::uint64_t service_budget=0)
 
bool failed () const noexcept
 
cola_runtime_work work () const
 
std::uint64_t credit () const
 
snapshot_type advance (std::uint64_t budget)
 
snapshot_type contribute (profile_record const &record, std::uint64_t service_budget=64)
 
snapshot_type contribute (std::span< profile_record const > records, std::uint64_t service_budget=64)
 

Static Public Member Functions

static cola_runtime from_snapshot (snapshot_type source, Compose compose={})
 

Private Types

enum class  phase {
  merge_start , merge_step , merge_finish , index_start ,
  index_step , index_finish , publish
}
 
using merge_compose = std::conditional_t< std::is_same_v< Compose, replace_native_value >, Compose, std::reference_wrapper< Compose > >
 
using merge_type = native_merge_builder< P, native_type, merge_compose >
 
using index_type = cola_index_builder< P, native_type, node_type >
 

Private Member Functions

 cola_runtime (std::unique_ptr< execution > value)
 
execution const & active () const
 
execution & writable ()
 

Private Attributes

std::unique_ptr< execution > execution_
 

Member Typedef Documentation

◆ index_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::index_type = cola_index_builder<P, native_type, node_type>
private

◆ merge_compose

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::merge_compose = std::conditional_t<std::is_same_v<Compose, replace_native_value>, Compose, std::reference_wrapper<Compose> >
private

◆ merge_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::merge_type = native_merge_builder<P, native_type, merge_compose>
private

◆ native_pointer

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::native_pointer = typename node_type::native_pointer

◆ native_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::native_type = cola_runtime_native<P>

◆ node_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::node_type = cola_runtime_node<P>

◆ pair_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::pair_type = typename node_type::pair_type

◆ policy_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::policy_type = P

◆ query_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::query_type = typename snapshot_type::query_type

◆ run_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::run_type = cola_runtime_run<P>

◆ snapshot_type

template<class P , class Compose = replace_native_value>
using everett::cola_runtime< P, Compose >::snapshot_type = cola_runtime_snapshot<P>

Member Enumeration Documentation

◆ phase

template<class P , class Compose = replace_native_value>
enum class everett::cola_runtime::phase
strongprivate
Enumerator
merge_start 
merge_step 
merge_finish 
index_start 
index_step 
index_finish 
publish 

Constructor & Destructor Documentation

◆ cola_runtime() [1/4]

template<class P , class Compose = replace_native_value>
everett::cola_runtime< P, Compose >::cola_runtime ( Compose  compose = {})
inlineexplicit

◆ cola_runtime() [2/4]

template<class P , class Compose = replace_native_value>
everett::cola_runtime< P, Compose >::cola_runtime ( cola_runtime< P, Compose > const &  )
delete

◆ cola_runtime() [3/4]

template<class P , class Compose = replace_native_value>
everett::cola_runtime< P, Compose >::cola_runtime ( cola_runtime< P, Compose > &&  )
defaultnoexcept

◆ cola_runtime() [4/4]

template<class P , class Compose = replace_native_value>
everett::cola_runtime< P, Compose >::cola_runtime ( std::unique_ptr< execution >  value)
inlineexplicitprivate

Member Function Documentation

◆ active()

template<class P , class Compose = replace_native_value>
execution const & everett::cola_runtime< P, Compose >::active ( ) const
inlineprivate

◆ admission_cost()

template<class P , class Compose = replace_native_value>
std::uint64_t everett::cola_runtime< P, Compose >::admission_cost ( ) const
inline

◆ admission_ready()

template<class P , class Compose = replace_native_value>
bool everett::cola_runtime< P, Compose >::admission_ready ( ) const
inlinenoexcept

◆ advance()

template<class P , class Compose = replace_native_value>
snapshot_type everett::cola_runtime< P, Compose >::advance ( std::uint64_t  budget)
inline

◆ contribute() [1/2]

template<class P , class Compose = replace_native_value>
snapshot_type everett::cola_runtime< P, Compose >::contribute ( profile_record const &  record,
std::uint64_t  service_budget = 64 
)
inline

◆ contribute() [2/2]

template<class P , class Compose = replace_native_value>
snapshot_type everett::cola_runtime< P, Compose >::contribute ( std::span< profile_record const >  records,
std::uint64_t  service_budget = 64 
)
inline

◆ credit()

template<class P , class Compose = replace_native_value>
std::uint64_t everett::cola_runtime< P, Compose >::credit ( ) const
inline

◆ failed()

template<class P , class Compose = replace_native_value>
bool everett::cola_runtime< P, Compose >::failed ( ) const
inlinenoexcept

◆ from_snapshot()

template<class P , class Compose = replace_native_value>
static cola_runtime everett::cola_runtime< P, Compose >::from_snapshot ( snapshot_type  source,
Compose  compose = {} 
)
inlinestatic

◆ next_service_cost()

template<class P , class Compose = replace_native_value>
std::uint64_t everett::cola_runtime< P, Compose >::next_service_cost ( ) const
inline

◆ operator=() [1/2]

template<class P , class Compose = replace_native_value>
cola_runtime & everett::cola_runtime< P, Compose >::operator= ( cola_runtime< P, Compose > &&  )
defaultnoexcept

◆ operator=() [2/2]

template<class P , class Compose = replace_native_value>
cola_runtime & everett::cola_runtime< P, Compose >::operator= ( cola_runtime< P, Compose > const &  )
delete

◆ pending()

template<class P , class Compose = replace_native_value>
bool everett::cola_runtime< P, Compose >::pending ( ) const
inlinenoexcept

◆ snapshot()

template<class P , class Compose = replace_native_value>
snapshot_type everett::cola_runtime< P, Compose >::snapshot ( ) const
inline

◆ try_contribute()

template<class P , class Compose = replace_native_value>
std::optional< snapshot_type > everett::cola_runtime< P, Compose >::try_contribute ( profile_record const &  record,
std::uint64_t  service_budget = 0 
)
inline

◆ work()

template<class P , class Compose = replace_native_value>
cola_runtime_work everett::cola_runtime< P, Compose >::work ( ) const
inline

◆ writable()

template<class P , class Compose = replace_native_value>
execution & everett::cola_runtime< P, Compose >::writable ( )
inlineprivate

Member Data Documentation

◆ execution_

template<class P , class Compose = replace_native_value>
std::unique_ptr<execution> everett::cola_runtime< P, Compose >::execution_
private

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