C++ Actor Framework 0.19
|
Simple group implementation that allows arbitrary strings as group names. More...
#include <local_group_module.hpp>
Classes | |
class | impl |
Implementation of the group interface for instances of this module. More... | |
Public Types | |
using | super = group_module |
using | intermediary_actor = stateful_actor< intermediary_actor_state > |
A group intermediary enables remote actors to join and leave groups on this endpoint as well as sending message to it. | |
using | instances_map = std::unordered_map< std::string, intrusive_ptr< impl > > |
![]() | |
using | super = detail::atomic_ref_counted |
Public Member Functions | |
local_group_module (actor_system &sys) | |
expected< group > | get (const std::string &group_name) override |
Returns a pointer to the group associated with the name group_name . | |
void | stop () override |
Stops all groups from this module. | |
![]() | |
group_module (actor_system &sys, std::string mname) | |
group_module (const group_module &)=delete | |
group_module & | operator= (const group_module &)=delete |
virtual void | stop ()=0 |
Stops all groups from this module. | |
virtual expected< group > | get (const std::string &group_name)=0 |
Returns a pointer to the group associated with the name group_name . | |
actor_system & | system () const noexcept |
Returns the hosting actor system. | |
const std::string & | name () const noexcept |
Returns the name of this module implementation. | |
![]() | |
atomic_ref_counted (const atomic_ref_counted &) | |
atomic_ref_counted & | operator= (const atomic_ref_counted &) |
void | ref () const noexcept |
Increases reference count by one. | |
void | deref () const noexcept |
Decreases reference count by one and calls request_deletion when it drops to zero. | |
bool | unique () const noexcept |
Queries whether there is exactly one reference. | |
size_t | get_reference_count () const noexcept |
Queries the current reference count for this object. | |
Additional Inherited Members | |
![]() | |
std::atomic< size_t > | rc_ |
![]() | |
template<class T , class... Ts> | |
intrusive_cow_ptr< T > | make_copy_on_write (Ts &&... xs) |
Constructs an object of type T in an intrusive_cow_ptr . | |
template<class T , class... Ts> | |
intrusive_ptr< T > | make_counted (Ts &&... xs) |
Constructs an object of type T in an intrusive_ptr . | |
Simple group implementation that allows arbitrary strings as group names.
However, the group names must use a string representation of the local node ID as prefix. Each group instance spins up an intermediary actor to enable remote access to the group. The default module is used internally by the "local" as well as the "remote" module.
|
overridevirtual |
Returns a pointer to the group associated with the name group_name
.
@threadsafe
Implements caf::group_module.
|
overridevirtual |
Stops all groups from this module.
Implements caf::group_module.