Globally unique identifier for actors across a distributed system. More...
#include <actorid.hpp>
Public Member Functions | |
| TActorId ()=default | |
| Default constructor creates an invalid actor ID. | |
| operator bool () const | |
| Check if the actor ID is valid. | |
| TNodeId | NodeId () const |
| Get the node ID component. | |
| TLocalActorId | ActorId () const |
| Get the local actor ID component. | |
| TCookie | Cookie () const |
| Get the cookie component. | |
| std::string | ToString () const |
| Convert actor ID to a human-readable string. | |
| TActorId (TNodeId nodeId, TLocalActorId actorId, TCookie cookie) | |
| Construct actor ID with specific components. | |
Globally unique identifier for actors across a distributed system.
Combines a 16-bit NodeId, a 32-bit local ActorId, and a 16-bit Cookie into a compact, copyable handle. The cookie increments each time a slot is reused, preventing stale messages from reaching a newly spawned actor that occupies the same local slot as a terminated one.
A default-constructed TActorId (all zeros) is invalid; operator bool() returns false for it.
|
inline |
Construct actor ID with specific components.
| nodeId | Node identifier |
| actorId | Local actor identifier |
| cookie | Cookie for versioning |
|
inline |
Check if the actor ID is valid.
|
inline |
Convert actor ID to a human-readable string.
"ActorId:<NodeId>:<LocalActorId>:<Cookie>"