Actor environment including scheduler, registry, and optional components such as a middleman.
More...
|
| actor_system (const actor_system &)=delete |
|
actor_system & | operator= (const actor_system &)=delete |
|
| actor_system (actor_system_config &cfg, version::abi_token=make_abi_token()) |
|
template<class T , class E = std::enable_if_t<!is_typed_actor_v<T>>> |
mpi | message_types (type_list< T >) const |
|
template<class... Ts> |
mpi | message_types (type_list< typed_actor< Ts... > >) const |
|
template<class T , class E = std::enable_if_t<!detail::is_type_list_v<T>>> |
mpi | message_types (const T &) const |
|
template<class T > |
mpi | message_types () const |
| Returns a string representation of the messaging interface using portable names;.
|
|
bool | assignable (const mpi &xs, const mpi &ys) const |
| Returns whether actor handles described by xs can be assigned to actor handles described by ys .
|
|
template<class T > |
bool | assignable (const std::set< std::string > &xs) const |
| Returns whether actor handles described by xs can be assigned to actor handles of type T .
|
|
base_metrics_t & | base_metrics () noexcept |
|
const base_metrics_t & | base_metrics () const noexcept |
|
const actor_metric_families_t & | actor_metric_families () const noexcept |
|
detail::global_meta_objects_guard_type | meta_objects_guard () const noexcept |
| Returns the global meta objects guard.
|
|
span< const std::string > | metrics_actors_includes () const noexcept |
| Returns the caf.metrics-filters.actors.includes parameter.
|
|
span< const std::string > | metrics_actors_excludes () const noexcept |
| Returns the caf.metrics-filters.actors.excludes parameter.
|
|
const actor_system_config & | config () const |
| Returns the configuration of this actor system.
|
|
actor_clock & | clock () noexcept |
| Returns the system-wide clock.
|
|
size_t | detached_actors () const noexcept |
| Returns the number of detached actors.
|
|
bool | await_actors_before_shutdown () const |
| Returns whether this actor system calls await_all_actors_done in its destructor before shutting down.
|
|
void | await_actors_before_shutdown (bool new_value) |
| Configures whether this actor system calls await_all_actors_done in its destructor before shutting down.
|
|
const strong_actor_ptr & | spawn_serv () const |
| Returns the internal actor for dynamic spawn operations.
|
|
const strong_actor_ptr & | config_serv () const |
| Returns the internal actor for storing the runtime configuration for this actor system.
|
|
telemetry::metric_registry & | metrics () noexcept |
| Returns the metrics registry for this system.
|
|
const telemetry::metric_registry & | metrics () const noexcept |
| Returns the metrics registry for this system.
|
|
const node_id & | node () const |
| Returns the host-local identifier for this system.
|
|
caf::scheduler & | scheduler () |
| Returns the scheduler instance.
|
|
caf::logger & | logger () |
| Returns the system-wide event logger.
|
|
actor_registry & | registry () |
| Returns the system-wide actor registry.
|
|
bool | has_middleman () const |
| Returns true if the I/O module is available, false otherwise.
|
|
io::middleman & | middleman () |
| Returns the middleman instance from the I/O module.
|
|
bool | has_openssl_manager () const |
| Returns true if the openssl module is available, false otherwise.
|
|
openssl::manager & | openssl_manager () const |
| Returns the manager instance from the OpenSSL module.
|
|
bool | has_network_manager () const noexcept |
| Returns true if the network module is available, false otherwise.
|
|
net::middleman & | network_manager () |
| Returns the network manager (middleman) instance.
|
|
actor_id | next_actor_id () |
| Returns a new actor ID.
|
|
actor_id | latest_actor_id () const |
| Returns the last given actor ID.
|
|
void | await_all_actors_done () const |
| Blocks this caller until all actors are done.
|
|
void | monitor (const node_id &node, const actor_addr &observer) |
| Send a node_down_msg to observer if this system loses connection to node .
|
|
void | demonitor (const node_id &node, const actor_addr &observer) |
| Removes observer from the list of actors that receive a node_down_msg if this system loses connection to node .
|
|
intrusive_ptr< actor_companion > | make_companion () |
| Creates a new actor companion and returns a smart pointer to it.
|
|
template<class C , spawn_options Os, class... Ts> |
infer_handle_from_class_t< C > | spawn_class (actor_config &cfg, Ts &&... xs) |
| Called by spawn when used to create a class-based actor to apply automatic conversions to xs before spawning the actor.
|
|
template<class C , spawn_options Os = no_spawn_options, class... Ts> |
infer_handle_from_class_t< C > | spawn (Ts &&... xs) |
| Returns a new actor of type C using xs... as constructor arguments.
|
|
template<spawn_options Os = no_spawn_options, class F , class... Ts> |
infer_handle_from_fun_t< F > | spawn (F fun, Ts &&... xs) |
| Returns a new functor-based actor.
|
|
template<spawn_options Options = no_spawn_options, class CustomSpawn , class... Args> |
CustomSpawn::handle_type | spawn (CustomSpawn, Args &&... args) |
| Returns a new stateful actor.
|
|
template<class Handle , class E = std::enable_if_t<is_handle_v<Handle>>> |
expected< Handle > | spawn (const std::string &name, message args, caf::scheduler *ctx=nullptr, bool check_interface=true, const mpi *expected_ifs=nullptr) |
| Returns a new actor with run-time type name , constructed with the arguments stored in args .
|
|
template<class... Args> |
void | println (term color, std::string_view fmt, Args &&... args) |
| Adds a new line to stdout.
|
|
template<class... Args> |
void | println (std::string_view fmt, Args &&... args) |
| Adds a new line to stdout.
|
|
void | redirect_text_output (void *out, void(*write)(void *, term, const char *, size_t), void(*cleanup)(void *)) |
| Redirects the output of println to a custom function.
|
|
Actor environment including scheduler, registry, and optional components such as a middleman.
- Examples
- dancing_kirby.cpp, dining_philosophers.cpp, and hello_world.cpp.