C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
caf::proxy_registry Class Reference

Groups a (distributed) set of actors and allows actors in the same namespace to exchange messages. More...

#include <proxy_registry.hpp>

Classes

class  backend
 Responsible for creating proxy actors. More...
 

Public Types

using proxy_map = std::map< actor_id, strong_actor_ptr >
 A map that stores all proxies for known remote actors.
 

Public Member Functions

 proxy_registry (actor_system &sys, backend &be)
 
 proxy_registry (const proxy_registry &)=delete
 
proxy_registryoperator= (const proxy_registry &)=delete
 
void serialize (serializer &sink, const actor_addr &addr) const
 
void serialize (deserializer &source, actor_addr &addr)
 
void write (serializer *sink, const actor_addr &ptr) const
 Writes an actor address to sink and adds the actor to the list of known actors for a later deserialization.
 
actor_addr read (deserializer *source)
 Reads an actor address from source, creating addresses for remote actors on the fly if needed.
 
size_t count_proxies (const node_id &node) const
 Returns the number of proxies for node.
 
strong_actor_ptr get (const node_id &node, actor_id aid) const
 Returns the proxy instance identified by node and aid.
 
strong_actor_ptr get_or_put (const node_id &nid, actor_id aid)
 Returns the proxy instance identified by node and aid or creates a new (default) proxy instance.
 
std::vector< strong_actor_ptrget_all (const node_id &node) const
 Returns all known proxies.
 
void erase (const node_id &nid)
 Deletes all proxies for node.
 
void erase (const node_id &nid, actor_id aid, error rsn=exit_reason::remote_link_unreachable)
 Deletes the proxy with id aid for nid.
 
bool empty () const
 Queries whether there are any proxies left.
 
void clear ()
 Deletes all proxies.
 
actor_systemsystem ()
 Returns the hosting actor system.
 
const actor_systemsystem () const
 Returns the hosting actor system.
 
void set_last_hop (node_id *ptr)
 Sets the thread-local last hop variable on the backend.
 

Detailed Description

Groups a (distributed) set of actors and allows actors in the same namespace to exchange messages.


The documentation for this class was generated from the following files: