rotor
Event loop friendly C++ actor micro-framework
 
Loading...
Searching...
No Matches
rotor::ev::supervisor_config_ev_builder_t< Supervisor > Struct Template Reference

CRTP supervisor ev config builder. More...

#include <supervisor_config_ev.h>

Inheritance diagram for rotor::ev::supervisor_config_ev_builder_t< Supervisor >:
rotor::supervisor_config_builder_t< Supervisor > rotor::actor_config_builder_t< Supervisor >

Public Types

using builder_t = typename Supervisor::template config_builder_t< Supervisor >
 final builder class
 
using parent_t = supervisor_config_builder_t< Supervisor >
 parent config builder
 
using parent_t = actor_config_builder_t< Supervisor >
 parent config builder
 
- Public Types inherited from rotor::supervisor_config_builder_t< Supervisor >
using builder_t = typename Supervisor::template config_builder_t< Supervisor >
 final builder class
 
using parent_t = actor_config_builder_t< Supervisor >
 parent config builder
 
- Public Types inherited from rotor::actor_config_builder_t< Supervisor >
using builder_t = typename Actor::template config_builder_t< Supervisor >
 final builder class
 
using config_t = typename Actor::config_t
 final config class
 
using actor_ptr_t = intrusive_ptr_t< Supervisor >
 intrusive pointer to actor
 
using install_action_t = std::function< void(actor_ptr_t &)>
 actor post-constructor callback type
 

Public Member Functions

builder_t && loop (struct ev_loop *loop) &&
 sets loop
 
builder_t && loop_ownership (bool value) &&
 instructs to take ownership on the loop (aka be destroyed by supervisor)
 
- Public Member Functions inherited from rotor::supervisor_config_builder_t< Supervisor >
builder_t && policy (supervisor_policy_t policy_) &&noexcept
 defines actor's startup policy
 
builder_t && create_registry (bool value=true) &&noexcept
 instructs supervisor to create an registry
 
builder_t && synchronize_start (bool value=true) &&noexcept
 instructs supervisor to synchronize start on it's children actors
 
builder_t && registry_address (const address_ptr_t &value) &&noexcept
 injects external registry address
 
builder_t && inbound_queue_size (size_t value) &&
 initial queue size for inbound messages. Makes sense only for root/leader supervisor
 
builder_t && poll_duration (const pt::time_duration &value) &&
 how much time spend in active inbound queue polling
 
builder_t && shutdown_flag (const std::atomic_bool &value, const pt::time_duration &interval) &&
 atomic shutdown flag and the period for polling it
 
virtual bool validate () noexcept
 checks whether config is valid, i.e. all necessary fields are set
 
- Public Member Functions inherited from rotor::actor_config_builder_t< Supervisor >
 actor_config_builder_t (install_action_t &&action_, supervisor_t *supervisor_)
 ctor with install action and raw pointer to supervisor
 
 actor_config_builder_t (install_action_t &&action_, system_context_t &system_context_)
 ctor with install action and pointer to system_context_t
 
builder_t && timeout (const pt::time_duration &timeout) &&noexcept
 setter for init and shutdown timeout
 
builder_t && init_timeout (const pt::time_duration &timeout) &&noexcept
 setter for init timeout
 
builder_t && shutdown_timeout (const pt::time_duration &timeout) &&noexcept
 setter for shutdown timeout
 
builder_t && spawner_address (const address_ptr_t &value) &&noexcept
 spawner address
 
builder_t && escalate_failure (bool value=true) &&noexcept
 shutdown supervisor upon actor failure
 
builder_t && autoshutdown_supervisor (bool value=true) &&noexcept
 shutdown supervisor when an actor is down
 
actor_ptr_t finish () &&
 constructs actor from the current config
 

Static Public Attributes

static constexpr const std::uint32_t LOOP = 1 << 2
 bit mask for loop validation
 
static constexpr const std::uint32_t LOOP_OWNERSHIP = 1 << 3
 bit mask for loop ownership validation
 
static constexpr const std::uint32_t requirements_mask = parent_t::requirements_mask | LOOP | LOOP_OWNERSHIP
 bit mask for all required fields
 
- Static Public Attributes inherited from rotor::actor_config_builder_t< Supervisor >
static constexpr const std::uint32_t INIT_TIMEOUT
 bit mask for init timeout validation
 
static constexpr const std::uint32_t SHUTDOWN_TIMEOUT
 bit mask for shutdown timeout validation
 
static constexpr const std::uint32_t requirements_mask
 bit mask for all required fields
 

Additional Inherited Members

- Public Attributes inherited from rotor::actor_config_builder_t< Supervisor >
install_action_t install_action
 post-construction callback
 
supervisor_tsupervisor
 raw pointer to supervisor_t (is null for top-level supervisors)
 
system_context_tsystem_context
 reference to system_context_t
 
config_t config
 the currently build config
 
std::uint32_t mask
 required fields mask (used for validation)
 

Detailed Description

template<typename Supervisor>
struct rotor::ev::supervisor_config_ev_builder_t< Supervisor >

CRTP supervisor ev config builder.


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