CRTP supervisor config builder. More...
#include <supervisor_config.h>
Public Types | |
| 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 |
| final builder class | |
| using | config_t |
| final config class | |
| using | actor_ptr_t |
| intrusive pointer to actor | |
| using | install_action_t |
| actor post-constructor callback type | |
Public Member Functions | |
| 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 | |
Additional Inherited Members | |
| Public Attributes inherited from rotor::actor_config_builder_t< Supervisor > | |
| install_action_t | install_action |
| post-construction callback | |
| supervisor_t * | supervisor |
| raw pointer to supervisor_t (is null for top-level supervisors) | |
| system_context_t & | system_context |
| reference to system_context_t | |
| config_t | config |
| the currently build config | |
| std::uint32_t | mask |
| required fields mask (used for validation) | |
| 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 | |
CRTP supervisor config builder.
|
inline |
atomic shutdown flag and the period for polling it
The thread-safe way to shutdown supervisor even when compiled with ROTOR_BUILD_THREAD_UNSAFE option. Might be useful in single-threaded applications.
For more reactive behavior in thread-safe environment the supervisor::shutdown() should be used.
|
inlinevirtualnoexcept |
checks whether config is valid, i.e. all necessary fields are set
Reimplemented from rotor::actor_config_builder_t< Supervisor >.