|
|
| scheduled_actor (actor_config &cfg) |
| |
|
| scheduled_actor (scheduled_actor &&)=delete |
| |
|
| scheduled_actor (const scheduled_actor &)=delete |
| |
|
scheduled_actor & | operator= (scheduled_actor &&)=delete |
| |
|
scheduled_actor & | operator= (const scheduled_actor &)=delete |
| |
| bool | enqueue (mailbox_element_ptr ptr, scheduler *sched) override |
| | Enqueues a new message wrapped in a mailbox_element to the actor. More...
|
| |
| mailbox_element * | peek_at_next_mailbox_element () override |
| | Called by the testing DSL to peek at the next element in the mailbox. More...
|
| |
| const char * | name () const override |
| | Returns an implementation-dependent name for logging purposes, which is only valid as long as the actor is running. More...
|
| |
|
void | launch (scheduler *sched, bool lazy, bool hide) override |
| |
|
void | on_cleanup (const error &reason) override |
| | Called from cleanup to perform extra cleanup actions for this actor.
|
| |
| subtype_t | subtype () const noexcept override |
| | Returns a subtype hint for this object. More...
|
| |
|
void | ref_resumable () const noexcept final |
| | Add a strong reference count to this object.
|
| |
|
void | deref_resumable () const noexcept final |
| | Remove a strong reference count from this object.
|
| |
| resume_result | resume (scheduler *, size_t) override |
| | Resume any pending computation until it is either finished or needs to be re-scheduled later. More...
|
| |
| virtual proxy_registry * | proxy_registry_ptr () |
| | Returns a factory for proxies created and managed by this actor or nullptr. More...
|
| |
| void | quit (error x=error{}) |
| | Finishes execution of this actor after any currently running message handler is done. More...
|
| |
|
abstract_mailbox & | mailbox () noexcept |
| | Returns the queue for storing incoming messages.
|
| |
|
bool | initialized () const noexcept |
| | Checks whether this actor is fully initialized.
|
| |
|
bool | inactive () const noexcept |
| | Checks whether this actor is currently inactive, i.e., not ready to run.
|
| |
|
void | set_default_handler (default_handler fun) |
| | Sets a custom handler for unexpected messages.
|
| |
|
template<class F > |
| std::enable_if_t< std::is_invocable_r_v< skippable_result, F, message & > > | set_default_handler (F fun) |
| | Sets a custom handler for unexpected messages.
|
| |
|
void | set_error_handler (error_handler fun) |
| | Sets a custom handler for error messages.
|
| |
|
template<class F > |
| std::enable_if_t< std::is_invocable_v< F, error & > > | set_error_handler (F fun) |
| | Sets a custom handler for error messages.
|
| |
|
void | set_down_handler (down_handler fun) |
| | Sets a custom handler for down messages.
|
| |
|
template<class F > |
| std::enable_if_t< std::is_invocable_v< F, down_msg & > > | set_down_handler (F fun) |
| | Sets a custom handler for down messages.
|
| |
|
void | set_node_down_handler (node_down_handler fun) |
| | Sets a custom handler for node down messages.
|
| |
|
template<class F > |
| std::enable_if_t< std::is_invocable_v< F, node_down_msg & > > | set_node_down_handler (F fun) |
| | Sets a custom handler for down messages.
|
| |
|
void | set_exit_handler (exit_handler fun) |
| | Sets a custom handler for error messages.
|
| |
|
template<class F > |
| std::enable_if_t< std::is_invocable_v< F, exit_msg & > > | set_exit_handler (F fun) |
| | Sets a custom handler for exit messages.
|
| |
| template<class RefType , class RepeatType > |
| void | set_idle_handler (timespan delay, RefType, RepeatType, idle_handler fun) |
| | Sets a custom handler for timeouts that trigger after not receiving a message for a certain amount of time. More...
|
| |
|
virtual void | add_awaited_response_handler (message_id response_id, behavior bhvr, disposable pending_timeout={})=0 |
| | Adds a callback for an awaited response.
|
| |
|
virtual void | add_multiplexed_response_handler (message_id response_id, behavior bhvr, disposable pending_timeout={})=0 |
| | Adds a callback for a multiplexed response.
|
| |
|
virtual void | call_error_handler (error &what)=0 |
| | Calls the default error handler.
|
| |
|
virtual void | run_actions ()=0 |
| | Runs all pending actions.
|
| |
| template<class... Ts> |
| auto | response_to_flow_cell (message_id response_id, disposable pending_timeout={}) |
| | Lifts a response message into a flow cell in order to allow the actor to turn a response into an observable or single. More...
|
| |
|
| local_actor (actor_config &cfg) |
| |
|
void | setup_metrics () |
| |
|
clock_type::time_point | now () const noexcept |
| | Returns the current time.
|
| |
| disposable | request_response_timeout (timespan d, message_id mid) |
| | Requests a new timeout for mid. More...
|
| |
|
template<class... Args> |
| void | println (std::string_view fmt, Args &&... args) |
| | Adds a new line to stdout.
|
| |
|
template<class... Args> |
| void | println (term color, std::string_view fmt, Args &&... args) |
| | Adds a new line to stdout.
|
| |
|
template<class T , spawn_options Os = no_spawn_options, class... Ts> |
| infer_handle_from_class_t< T > | spawn (Ts &&... xs) |
| |
|
template<spawn_options Options = no_spawn_options, class CustomSpawn , class... Args> |
| CustomSpawn::handle_type | spawn (CustomSpawn, Args &&... args) |
| |
|
template<spawn_options Os = no_spawn_options, class F , class... Ts> |
| infer_handle_from_fun_t< F > | spawn (F fun, Ts &&... xs) |
| |
|
void | send_exit (const actor_addr &receiver, error reason) |
| | Sends an exit message to receiver.
|
| |
|
void | send_exit (const strong_actor_ptr &receiver, error reason) |
| | Sends an exit message to receiver.
|
| |
|
template<class Handle > |
| void | send_exit (const Handle &receiver, error reason) |
| | Sends an exit message to receiver.
|
| |
|
template<message_priority Priority = message_priority::normal, class Handle , class T , class... Ts> |
| void | anon_send (const Handle &receiver, T &&arg, Ts &&... args) |
| |
|
template<message_priority Priority = message_priority::normal, class Handle , class T , class... Ts> |
| disposable | scheduled_anon_send (const Handle &receiver, actor_clock::time_point timeout, T &&arg, Ts &&... args) |
| |
|
template<message_priority Priority = message_priority::normal, class Handle , class T , class... Ts> |
| disposable | delayed_anon_send (const Handle &receiver, actor_clock::duration_type timeout, T &&arg, Ts &&... args) |
| |
|
scheduler * | context () const noexcept |
| | Returns the execution unit currently used by this actor.
|
| |
|
void | context (scheduler *x) noexcept |
| | Sets the execution unit for this actor.
|
| |
|
actor_system & | system () const noexcept |
| | Returns the hosting actor system.
|
| |
|
const actor_system_config & | config () const noexcept |
| | Returns the config of the hosting actor system.
|
| |
|
actor_clock & | clock () const noexcept |
| | Returns the clock of the actor system.
|
| |
| strong_actor_ptr & | current_sender () noexcept |
| | Returns a pointer to the sender of the current message. More...
|
| |
|
message_id | current_message_id () noexcept |
| | Returns the ID of the current message.
|
| |
| message_id | take_current_message_id () noexcept |
| | Returns the ID of the current message and marks the ID stored in the current mailbox element as answered. More...
|
| |
|
void | drop_current_message_id () noexcept |
| | Marks the current message ID as answered.
|
| |
|
mailbox_element * | current_mailbox_element () noexcept |
| | Returns a pointer to the currently processed mailbox element.
|
| |
| void | monitor (const node_id &node) |
| | Adds a unidirectional monitor to node. More...
|
| |
|
void | demonitor (const node_id &node) |
| | Removes a monitor from node.
|
| |
| virtual void | on_exit () |
| | Can be overridden to perform cleanup code after an actor finished execution. More...
|
| |
| template<class... Ts> |
| detail::response_promise_t< Ts... > | make_response_promise () |
| | Creates a typed_response_promise to respond to a request later on. More...
|
| |
|
response_promise | make_response_promise () |
| | Creates a response_promise to respond to a request later on.
|
| |
| virtual error | save_state (serializer &sink, unsigned int version) |
| | Serializes the state of this actor to sink. More...
|
| |
| virtual error | load_state (deserializer &source, unsigned int version) |
| | Deserializes the state of this actor from source. More...
|
| |
| const error & | fail_state () const noexcept |
| | Returns the currently defined fail state. More...
|
| |
|
| abstract_actor (const abstract_actor &)=delete |
| |
|
abstract_actor & | operator= (const abstract_actor &)=delete |
| |
| void | attach (attachable_ptr ptr) |
| | Attaches ptr to this actor. More...
|
| |
| template<class F > |
| void | attach_functor (F f) |
| | Convenience function that attaches the functor f to this actor. More...
|
| |
|
size_t | detach (const attachable::token &what) |
| | Detaches the first attached object that matches what.
|
| |
|
void | link_to (const actor_addr &other) |
| | Links this actor to other.
|
| |
|
template<class ActorHandle > |
| void | link_to (const ActorHandle &other) |
| | Links this actor to other.
|
| |
|
void | unlink_from (const actor_addr &other) |
| | Unlinks this actor from addr.
|
| |
|
template<class ActorHandle > |
| void | unlink_from (const ActorHandle &other) |
| | Links this actor to hdl.
|
| |
| virtual std::set< std::string > | message_types () const |
| | Returns the set of accepted messages types as strings or an empty set if this actor is untyped. More...
|
| |
|
actor_id | id () const noexcept |
| | Returns the ID of this actor.
|
| |
|
node_id | node () const noexcept |
| | Returns the node this actor is living on.
|
| |
|
actor_system & | home_system () const noexcept |
| | Returns the system that created this actor (or proxy).
|
| |
|
actor_control_block * | ctrl () const |
| | Returns the control block for this actor.
|
| |
|
actor_addr | address () const noexcept |
| | Returns the logical actor address.
|
| |
| bool | cleanup (error &&reason, scheduler *sched) |
| | Called by the runtime system to perform cleanup actions for this actor. More...
|
| |
|
observable_builder | make_observable () |
| | Returns a factory object for new observable objects on this coordinator.
|
| |
|
template<class Impl , class... Args> |
| std::enable_if_t< std::is_base_of_v< coordinated, Impl >, intrusive_ptr< Impl > > | add_child (std::in_place_type_t< Impl >, Args &&... args) |
| | Creates a new coordinated object on this coordinator.
|
| |
| template<class Impl , class... Args> |
| std::enable_if_t< std::is_base_of_v< coordinated, Impl >, typename Impl::handle_type > | add_child_hdl (std::in_place_type_t< Impl > token, Args &&... args) |
| | Like add_child, but wraps the result in a handle type. More...
|
| |
| virtual void | release_later (coordinated_ptr &child)=0 |
| | Resets child and releases the reference count of the coordinated object at the end of the current cycle. More...
|
| |
| template<class T > |
| std::enable_if_t< std::is_base_of_v< coordinated, T > > | release_later (intrusive_ptr< T > &child) |
| | Resets child and releases the reference count of the coordinated object at the end of the current cycle. More...
|
| |
| template<class Handle > |
| std::enable_if< Handle::holds_coordinated > | release_later (Handle &hdl) |
| | Resets hdl and releases the reference count of the coordinated object at the end of the current cycle. More...
|
| |
|
virtual steady_time_point | steady_time ()=0 |
| | Returns the current time on the monotonic clock of this coordinator.
|
| |
| virtual void | delay (action what)=0 |
| | Delays execution of an action until all pending actions were executed. More...
|
| |
| template<class F > |
| void | delay_fn (F &&what) |
| | Delays execution of an action until all pending actions were executed. More...
|
| |
| virtual disposable | delay_until (steady_time_point abs_time, action what)=0 |
| | Delays execution of an action with an absolute timeout. More...
|
| |
| template<class F > |
| disposable | delay_until_fn (steady_time_point abs_time, F &&what) |
| | Delays execution of an action until all pending actions were executed. More...
|
| |
| disposable | delay_for (timespan rel_time, action what) |
| | Delays execution of an action with a relative timeout. More...
|
| |
| template<class F > |
| disposable | delay_for_fn (timespan rel_time, F &&what) |
| | Delays execution of an action with a relative timeout. More...
|
| |
|
virtual void | ref_execution_context () const noexcept=0 |
| | Increases the reference count of the execution_context.
|
| |
| virtual void | deref_execution_context () const noexcept=0 |
| | Decreases the reference count of the execution context and destroys the object if necessary. More...
|
| |
| virtual void | schedule (action what)=0 |
| | Schedules what to run on the event loop of the execution context. More...
|
| |
| template<class F > |
| void | schedule_fn (F &&what) |
| | Schedules what to run on the event loop of the execution context. More...
|
| |
| virtual void | watch (disposable what)=0 |
| | Asks the coordinator to keep its event loop running until what becomes disposed since it depends on external events or produces events that are visible to outside observers. More...
|
| |