|
libcaf
0.14.4
|
A node ID consists of a host ID and process ID. More...
#include <node_id.hpp>
Inherits comparable< node_id >, and comparable< node_id, invalid_node_id_t >.
Public Types | |
| using | host_id_type = std::array< uint8_t, host_id_size > |
| Represents a 160 bit hash. | |
Public Member Functions | |
| node_id (const node_id &)=default | |
| node_id (const invalid_node_id_t &) | |
| node_id & | operator= (const node_id &)=default |
| node_id & | operator= (const invalid_node_id_t &) |
| node_id (uint32_t process_id, const std::string &hash) | |
Creates a node ID from process_id and hash. More... | |
| node_id (uint32_t process_id, const host_id_type &node_id) | |
Creates a node ID from process_id and hash. More... | |
| uint32_t | process_id () const |
| Identifies the running process. More... | |
| const host_id_type & | host_id () const |
| Identifies the host system. More... | |
Static Public Attributes | |
| static constexpr size_t | host_id_size = 20 |
| A 160 bit hash (20 bytes). | |
| static constexpr size_t | serialized_size = host_id_size + sizeof(uint32_t) |
The size of a node_id in serialized form. | |
Related Functions | |
(Note that these are not member functions.) | |
| constexpr invalid_node_id_t | invalid_node_id = invalid_node_id_t{} |
Identifies an invalid node_id. | |
| std::string | to_string (const node_id &what) |
A node ID consists of a host ID and process ID.
The host ID identifies the physical machine in the network, whereas the process ID identifies the running system-level process on that machine.
| caf::node_id::node_id | ( | uint32_t | process_id, |
| const std::string & | hash | ||
| ) |
Creates a node ID from process_id and hash.
| process_id | System-wide unique process identifier. |
| hash | Unique node id as hexadecimal string representation. |
| caf::node_id::node_id | ( | uint32_t | process_id, |
| const host_id_type & | node_id | ||
| ) |
Creates a node ID from process_id and hash.
| process_id | System-wide unique process identifier. |
| node_id | Unique node id. |
| const host_id_type& caf::node_id::host_id | ( | ) | const |
Identifies the host system.
| uint32_t caf::node_id::process_id | ( | ) | const |
Identifies the running process.
|
related |
1.8.9.1