C++ Actor Framework 1.0.0
|
Represents an actor running on a remote machine, or different hardware, or in a separate process. More...
#include <actor_proxy.hpp>
Public Member Functions | |
actor_proxy (actor_config &cfg) | |
virtual void | kill_proxy (scheduler *sched, error reason)=0 |
Invokes cleanup code. | |
void | setup_metrics () |
Public Member Functions inherited from caf::abstract_actor | |
abstract_actor (const abstract_actor &)=delete | |
abstract_actor & | operator= (const abstract_actor &)=delete |
void | attach (attachable_ptr ptr) |
Attaches ptr to this actor. | |
template<class F > | |
void | attach_functor (F f) |
Convenience function that attaches the functor f to this actor. | |
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 const char * | name () const =0 |
Returns an implementation-dependent name for logging purposes, which is only valid as long as the actor is running. | |
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. | |
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. | |
virtual bool | enqueue (mailbox_element_ptr what, scheduler *sched)=0 |
Enqueues a new message wrapped in a mailbox_element to the actor. | |
virtual mailbox_element * | peek_at_next_mailbox_element () |
Called by the testing DSL to peek at the next element in the mailbox. | |
bool | cleanup (error &&reason, scheduler *sched) |
Called by the runtime system to perform cleanup actions for this actor. | |
Additional Inherited Members | |
Protected Member Functions inherited from caf::abstract_actor | |
virtual void | on_unreachable () |
Called on actor if the last strong reference to it expired without a prior call to quit(exit_reason::not_exited) . | |
virtual void | on_cleanup (const error &reason) |
Called from cleanup to perform extra cleanup actions for this actor. | |
int | flags () const |
void | flags (int new_value) |
bool | is_terminated () const noexcept |
Checks whether this actor has terminated. | |
abstract_actor (actor_config &cfg) | |
void | attach_impl (attachable_ptr &ptr) |
size_t | detach_impl (const attachable::token &what, bool stop_on_hit=false, bool dry_run=false) |
void | add_link (abstract_actor *other) |
Causes the actor to establish a link to other . | |
void | remove_link (abstract_actor *other) |
Causes the actor to remove any established link to other . | |
virtual bool | add_backlink (abstract_actor *other) |
Adds an entry to other to the link table of this actor. | |
virtual bool | remove_backlink (abstract_actor *other) |
Removes an entry to other from the link table of this actor. | |
Protected Attributes inherited from caf::abstract_actor | |
std::atomic< int > | flags_ |
Holds several state and type flags. | |
std::mutex | mtx_ |
Guards members that may be subject to concurrent access . | |
std::condition_variable | cv_ |
Allows blocking actors to actively wait for incoming messages. | |
error | fail_state_ |
Stores the user-defined exit reason if this actor has finished execution. | |
attachable_ptr | attachables_head_ |
Points to the first attachable in the linked list of attachables (if any). | |
Related Symbols inherited from caf::abstract_actor | |
using | actor_id = uint64_t |
A unique actor ID. | |
Represents an actor running on a remote machine, or different hardware, or in a separate process.
Invokes cleanup code.
Implemented in caf::forwarding_actor_proxy.