base supervisor config, which holds shutdown timeout value More...
#include <supervisor_config.h>
Public Member Functions | |
| actor_config_t (supervisor_t *supervisor_) | |
| constructs actor_config_t from raw supervisor pointer | |
| Public Member Functions inherited from rotor::actor_config_t | |
| actor_config_t (supervisor_t *supervisor_) | |
| constructs actor_config_t from raw supervisor pointer | |
Public Attributes | |
| supervisor_policy_t | policy = supervisor_policy_t::shutdown_self |
| how to behave if child-actor fails | |
| bool | create_registry = false |
| whether the registry actor should be instantiated by supervisor | |
| bool | synchronize_start = false |
| whether supervisor should wait until all actors confirmed initialization, and only then send start signal to all of them | |
| address_ptr_t | registry_address |
| use the specified address of a registry | |
| size_t | inbound_queue_size = 64 |
| initial queue size for inbound messages. Makes sense only for root/leader supervisor | |
| pt::time_duration | poll_duration = pt::millisec{1} |
| How much time it will spend in polling inbound queue before switching into sleep mode (i.e. waiting external messages). | |
| const std::atomic_bool * | shutdown_flag = nullptr |
| pointer to atomic shutdown flag for polling (optional) | |
| pt::time_duration | shutdown_poll_frequency = pt::millisec{100} |
| the period for checking atomic shutdown flag | |
| Public Attributes inherited from rotor::actor_config_t | |
| plugins_constructor_t | plugins_constructor |
constructs plugin_storage_ptr_t | |
| supervisor_t * | supervisor |
raw pointer to supervisor_t | |
| pt::time_duration | init_timeout |
| max actor initialization time | |
| pt::time_duration | shutdown_timeout |
| max actor shutdown time | |
| address_ptr_t | spawner_address |
| address of the spawner | |
| bool | escalate_failure = false |
| shutdown supervisor upon child failure | |
| bool | autoshutdown_supervisor = false |
| shutdown supervisor upon child down | |
Additional Inherited Members | |
| Public Types inherited from rotor::actor_config_t | |
| using | plugins_constructor_t = std::function<plugin_storage_ptr_t()> |
constructs plugin_storage_ptr_t (type) | |
base supervisor config, which holds shutdown timeout value
| pt::time_duration rotor::supervisor_config_t::poll_duration = pt::millisec{1} |
How much time it will spend in polling inbound queue before switching into sleep mode (i.e. waiting external messages).
Under the hood this value instructs how much time rotor spends in spin-locks waiting messages (and burning CPU). If there is no large cross-thread messages traffic (i.e. < 100k messages per second) or there is need to save battery, set this value to zero for root supervisors.
| address_ptr_t rotor::supervisor_config_t::registry_address |
use the specified address of a registry
Can be useful if an registry was created on the different supervisors hierarchy
| const std::atomic_bool* rotor::supervisor_config_t::shutdown_flag = nullptr |
pointer to atomic shutdown flag for polling (optional)
When it is set, supervisor will periodically check that the flag is set and then shut self down.