#include <mailbox.h>
Public Types | |
| using | string = std::string |
| using | string_view = std::experimental::string_view |
| using | ReceivedMessagePtr = std::unique_ptr< ReceivedMessage > |
| using | Address = UUID::UUID |
| using | AddressRegistry = std::unordered_map< Address, Mailbox *, UUID::UUIDHashFunc, UUID::UUIDEqualFunc > |
Public Member Functions | |
| Mailbox (const size_t _mailbox_size=2048, const size_t _send_timeout_microseconds=0, const size_t _receive_timeout_microseconds=0, const size_t _receive_lock_timeout_microseconds=0) | |
| ~Mailbox () | |
| auto | send (const Message &message) -> bool |
| auto | send (const string_view type, const string_view payload, const size_t payload_alignment=sizeof(uint64_t), const Pid *from_pid=nullptr) -> bool |
| auto | receive (bool verify=false) -> ReceivedMessagePtr |
Static Public Member Functions | |
| static auto | create_message (const string_view type, const string_view payload, const size_t payload_alignment=sizeof(uint64_t), const Pid *from_pid=nullptr) -> flatbuffers::DetachedBuffer |
Public Attributes | |
| const Address | address |
Protected Member Functions | |
| auto | release (const string_view message) -> bool |
Friends | |
| class | ReceivedMessage |
| using ActorModel::Mailbox::Address = UUID::UUID |
| using ActorModel::Mailbox::AddressRegistry = std::unordered_map< Address, Mailbox*, UUID::UUIDHashFunc, UUID::UUIDEqualFunc > |
| using ActorModel::Mailbox::ReceivedMessagePtr = std::unique_ptr<ReceivedMessage> |
| using ActorModel::Mailbox::string = std::string |
| using ActorModel::Mailbox::string_view = std::experimental::string_view |
|
explicit |
| ActorModel::Mailbox::~Mailbox | ( | ) |

|
static |
| auto ActorModel::Mailbox::receive | ( | bool | verify = false | ) | -> ReceivedMessagePtr |

|
protected |

| auto ActorModel::Mailbox::send | ( | const string_view | type, |
| const string_view | payload, | ||
| const size_t | payload_alignment = sizeof(uint64_t), |
||
| const Pid * | from_pid = nullptr |
||
| ) | -> bool |
|
friend |