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

Represents a group that runs on a remote CAF node. More...

#include <group_tunnel.hpp>

Inheritance diagram for caf::detail::group_tunnel:
caf::detail::local_group_module::impl caf::abstract_group caf::ref_counted caf::abstract_channel

Public Types

using super = local_group_module::impl
 
using cached_message = std::tuple< strong_actor_ptr, message_id, message >
 
using cached_message_list = std::vector< cached_message >
 
- Public Types inherited from caf::detail::local_group_module::impl
using super = abstract_group
 
using subscriber_set = std::set< strong_actor_ptr, std::less<> >
 

Public Member Functions

 group_tunnel (group_module_ptr mod, std::string id, actor upstream_intermediary)
 
 group_tunnel (group_module_ptr mod, std::string id, node_id origin)
 
bool subscribe (strong_actor_ptr who) override
 Subscribes who to this group and returns true on success or false if who is already subscribed.
 
void unsubscribe (const actor_control_block *who) override
 Unsubscribes who from this group.
 
bool enqueue (strong_actor_ptr sender, message_id mid, message content, execution_unit *host) override
 Enqueues a new message without forwarding stack to the channel.
 
void stop () override
 Stops any background actors or threads and IO handles.
 
std::string stringify () const override
 Returns a human-readable string representation of the group ID.
 
void upstream_enqueue (strong_actor_ptr sender, message_id mid, message content, execution_unit *host)
 
bool connect (actor upstream_intermediary)
 
bool connected () const noexcept
 
actor worker () const noexcept
 
- Public Member Functions inherited from caf::detail::local_group_module::impl
 impl (group_module_ptr mod, std::string id, node_id origin)
 
 impl (group_module_ptr mod, std::string id)
 
bool enqueue (strong_actor_ptr sender, message_id mid, message content, execution_unit *host) override
 Enqueues a new message without forwarding stack to the channel.
 
bool subscribe (strong_actor_ptr who) override
 Subscribes who to this group and returns true on success or false if who is already subscribed.
 
void unsubscribe (const actor_control_block *who) override
 Unsubscribes who from this group.
 
actor intermediary () const noexcept override
 Returns the intermediary actor for the group if applicable.
 
void stop () override
 Stops any background actors or threads and IO handles.
 
- Public Member Functions inherited from caf::abstract_group
virtual bool subscribe (strong_actor_ptr who)=0
 Subscribes who to this group and returns true on success or false if who is already subscribed.
 
virtual void unsubscribe (const actor_control_block *who)=0
 Unsubscribes who from this group.
 
virtual void stop ()=0
 Stops any background actors or threads and IO handles.
 
actor_systemsystem () const noexcept
 Returns the hosting system.
 
group_modulemodule () const noexcept
 Returns the parent module.
 
node_id origin () const noexcept
 Returns the origin node of the group if applicable.
 
const std::string & identifier () const
 Returns a string representation of the group identifier, e.g., "224.0.0.1" for IPv4 multicast or a user-defined string for local groups.
 
virtual std::string stringify () const
 Returns a human-readable string representation of the group ID.
 
virtual actor intermediary () const noexcept
 Returns the intermediary actor for the group if applicable.
 
- 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
 
- Public Member Functions inherited from caf::abstract_channel
virtual bool enqueue (strong_actor_ptr sender, message_id mid, message content, execution_unit *host=nullptr)=0
 Enqueues a new message without forwarding stack to the channel.
 
bool is_abstract_actor () const
 
bool is_abstract_group () const
 
bool is_actor_decorator () const
 

Additional Inherited Members

- Public Attributes inherited from caf::detail::local_group_module::impl
friend local_group_module
 
- Static Public Attributes inherited from caf::abstract_channel
static constexpr int is_abstract_actor_flag = 0x01000000
 
static constexpr int is_abstract_group_flag = 0x02000000
 
static constexpr int is_actor_bind_decorator_flag = 0x04000000
 
static constexpr int is_actor_dot_decorator_flag = 0x08000000
 
static constexpr int is_actor_decorator_mask = 0x0C000000
 
static constexpr int is_hidden_flag = 0x10000000
 
- Protected Member Functions inherited from caf::detail::local_group_module::impl
template<class F >
auto critical_section (F &&fun) const
 
std::pair< bool, size_t > subscribe_impl (strong_actor_ptr who)
 
std::pair< bool, size_t > unsubscribe_impl (const actor_control_block *who)
 
- Protected Member Functions inherited from caf::abstract_group
 abstract_group (group_module_ptr mod, std::string id, node_id nid)
 
- Protected Member Functions inherited from caf::abstract_channel
int flags () const
 
void flags (int new_value)
 
- Protected Attributes inherited from caf::detail::local_group_module::impl
std::mutex mtx_
 
actor intermediary_
 
bool stopped_ = false
 
subscriber_set subscribers_
 
- Protected Attributes inherited from caf::abstract_group
group_module_ptr parent_
 
node_id origin_
 
std::string identifier_
 
- Protected Attributes inherited from caf::ref_counted
std::atomic< size_t > rc_
 

Detailed Description

Represents a group that runs on a remote CAF node.

Member Function Documentation

◆ enqueue()

bool caf::detail::group_tunnel::enqueue ( strong_actor_ptr  sender,
message_id  mid,
message  content,
execution_unit host 
)
overridevirtual

Enqueues a new message without forwarding stack to the channel.

Returns
true if the message has been dispatches successful, false otherwise. In the latter case, the channel has been closed and the message has been dropped. Once this function returns false, it returns false for all future invocations.

Implements caf::abstract_channel.

◆ stop()

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

Stops any background actors or threads and IO handles.

Implements caf::abstract_group.

◆ stringify()

std::string caf::detail::group_tunnel::stringify ( ) const
overridevirtual

Returns a human-readable string representation of the group ID.

Reimplemented from caf::abstract_group.

◆ subscribe()

bool caf::detail::group_tunnel::subscribe ( strong_actor_ptr  who)
overridevirtual

Subscribes who to this group and returns true on success or false if who is already subscribed.

Implements caf::abstract_group.

◆ unsubscribe()

void caf::detail::group_tunnel::unsubscribe ( const actor_control_block who)
overridevirtual

Unsubscribes who from this group.

Implements caf::abstract_group.


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