actor-framework
Public Member Functions | Public Attributes | Related Functions | List of all members
caf::mailbox_element Class Reference
Inheritance diagram for caf::mailbox_element:
Inheritance graph
[legend]
Collaboration diagram for caf::mailbox_element:
Collaboration graph
[legend]

Public Member Functions

void set_enqueue_time ()
 Sets enqueue_time to the current time.
 
double seconds_until (std::chrono::steady_clock::time_point t) const
 Returns the time between enqueueing the message and t.
 
double seconds_since_enqueue () const
 Returns the time since calling set_enqueue_time in seconds.
 
 mailbox_element (strong_actor_ptr sender, message_id mid, message payload)
 
bool is_high_priority () const
 
 mailbox_element (mailbox_element &&)=delete
 
 mailbox_element (const mailbox_element &)=delete
 
mailbox_elementoperator= (mailbox_element &&)=delete
 
mailbox_elementoperator= (const mailbox_element &)=delete
 
messagecontent () noexcept
 
const messagecontent () const noexcept
 
- Public Member Functions inherited from caf::intrusive::singly_linked< mailbox_element >
 singly_linked (node_pointer n) noexcept
 
 singly_linked (const singly_linked &)=delete
 
singly_linkedoperator= (const singly_linked &)=delete
 

Public Attributes

strong_actor_ptr sender
 Source of this message and receiver of the final response.
 
message_id mid
 Denotes whether this an asynchronous message or a request.
 
message payload
 Stores the payload.
 
std::chrono::steady_clock::time_point enqueue_time
 Stores a timestamp for when this element got enqueued.
 
- Public Attributes inherited from caf::intrusive::singly_linked< mailbox_element >
node_pointer next
 Intrusive pointer to the next element.
 

Related Functions

(Note that these are not member functions.)

using mailbox_element_ptr = std::unique_ptr< mailbox_element >
 
template<class Inspector >
bool inspect (Inspector &f, mailbox_element &x)
 
CAF_CORE_EXPORT mailbox_element_ptr make_mailbox_element (strong_actor_ptr sender, message_id id, message content)
 
template<class T , class... Ts>
std::enable_if_t<!std::is_same_v< std::decay_t< T >, message >||(sizeof...(Ts) >) mailbox_element_ptr make_mailbox_element (strong_actor_ptr sender, message_id id, T &&x, Ts &&... xs)
 

Additional Inherited Members

- Public Types inherited from caf::intrusive::singly_linked< mailbox_element >
using node_type = singly_linked< mailbox_element >
 The type for dummy nodes in singly linked lists.
 
using node_pointer = node_type *
 Type of the pointer connecting two singly linked nodes.
 

Friends And Related Function Documentation

◆ inspect()

template<class Inspector >
bool inspect ( Inspector &  f,
mailbox_element x 
)
related

◆ mailbox_element_ptr

using mailbox_element_ptr = std::unique_ptr<mailbox_element>
related

◆ make_mailbox_element() [1/2]

CAF_CORE_EXPORT mailbox_element_ptr make_mailbox_element ( strong_actor_ptr  sender,
message_id  id,
message  content 
)
related

◆ make_mailbox_element() [2/2]

template<class T , class... Ts>
std::enable_if_t<!std::is_same_v< std::decay_t< T >, message >||(sizeof...(Ts) >) mailbox_element_ptr make_mailbox_element ( strong_actor_ptr  sender,
message_id  id,
T &&  x,
Ts &&...  xs 
)
related

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