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

Simple group implementation that allows arbitrary strings as group names. More...

#include <local_group_module.hpp>

Inheritance diagram for caf::detail::local_group_module:
caf::group_module caf::ref_counted

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 > >
 

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.
 
- Public Member Functions inherited from caf::group_module
 group_module (actor_system &sys, std::string mname)
 
 group_module (const group_module &)=delete
 
group_moduleoperator= (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_systemsystem () const noexcept
 Returns the hosting actor system.
 
const std::string & name () const noexcept
 Returns the name of this module implementation.
 
- Public Member Functions inherited from caf::ref_counted
 ref_counted (const ref_counted &)
 
ref_countedoperator= (const 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
 

Additional Inherited Members

- Protected Attributes inherited from caf::ref_counted
std::atomic< size_t > rc_
 

Detailed Description

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.

Member Function Documentation

◆ get()

expected< group > caf::detail::local_group_module::get ( const std::string &  group_name)
overridevirtual

Returns a pointer to the group associated with the name group_name.

@threadsafe

Implements caf::group_module.

◆ stop()

void caf::detail::local_group_module::stop ( )
overridevirtual

Stops all groups from this module.

Implements caf::group_module.


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