Child actor runtime housekeeping information. More...
#include <child_info.h>
Public Types | |
| using | clock_t = pt::microsec_clock |
| an alias for used microsec clock | |
Public Member Functions | |
| template<typename Factory> | |
| child_info_t (address_ptr_t address_, Factory &&factory_, restart_policy_t policy_=restart_policy_t::normal_only, const pt::time_duration &restart_period_=pt::seconds{15}, size_t max_attempts_=0, bool escalate_failure_=false) noexcept | |
| CTOR for spawner-instantiated actor. | |
| template<typename Factory, typename Actor> | |
| child_info_t (address_ptr_t address_, Factory &&factory_, Actor &&actor_) noexcept | |
| CTOR for manually instantiated actor. | |
| void | spawn_attempt () noexcept |
| recalculates the state upon spawn_attempt | |
| spawn_demand_t | next_spawn (bool abnormal_shutdown) noexcept |
| checks whether new actor should be spawned | |
Public Attributes | |
| address_ptr_t | address |
| actor's address | |
| factory_t | factory |
| actor's factory (used by spawner) | |
| actor_ptr_t | actor |
| owning reference to current actor instance | |
| restart_policy_t | policy |
| restart policy (used by spawner) | |
| pt::time_duration | restart_period |
| minimum amount of time between spawning attempts | |
| shutdown_state_t | shutdown = shutdown_state_t::none |
| actor shutdown substate | |
| size_t | max_attempts |
| maximum restart attempts (used by spawner) | |
| size_t | attempts = 0 |
| the current number of restart attempts | |
| bool | active = true |
| whether the spawner is active | |
| bool | escalate_failure = false |
| whether an actor failure should be escalated to supervisor | |
| request_id_t | timer_id {0} |
| the timer_id when actor should be spawned | |
| pt::ptime | last_instantiation |
| when an actor was successfully spawned | |
| bool | initialized = false |
| whether actor is initialized | |
| bool | started = false |
| whether actor is started | |
Child actor runtime housekeeping information.
Used by child_manager_plugin_t.
|
noexcept |
checks whether new actor should be spawned
New actor can be spawned right now, a bit later, not spawned at all possibly with triggering supervisor shutdown.
|
noexcept |
recalculates the state upon spawn_attempt
The last last_instantiation is refreshed, and may be the child info becomes inactivated (due to restart_policy)