COROIO: NNet::NActors::TActorId Class Reference
COROIO
 
Loading...
Searching...
No Matches
NNet::NActors::TActorId Class Reference

Unique identifier for actors in the 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 string representation.
 
 TActorId (TNodeId nodeId, TLocalActorId actorId, TCookie cookie)
 Construct actor ID with specific components.
 

Detailed Description

Unique identifier for actors in the system.

TActorId combines node ID, local actor ID, and cookie to create a globally unique identifier for actors. The cookie helps with actor lifecycle management and prevents message delivery to reused actor IDs.

Constructor & Destructor Documentation

◆ TActorId()

NNet::NActors::TActorId::TActorId ( TNodeId  nodeId,
TLocalActorId  actorId,
TCookie  cookie 
)
inline

Construct actor ID with specific components.

Parameters
nodeIdNode identifier
actorIdLocal actor identifier
cookieCookie for versioning

Member Function Documentation

◆ ActorId()

TLocalActorId NNet::NActors::TActorId::ActorId ( ) const
inline

Get the local actor ID component.

Get the local actor ID component

◆ operator bool()

NNet::NActors::TActorId::operator bool ( ) const
inline

Check if the actor ID is valid.

Returns
true if the actor ID is valid (not all zeros)

◆ ToString()

std::string NNet::NActors::TActorId::ToString ( ) const
inline

Convert actor ID to string representation.

Returns
String in format "ActorId:NodeId:LocalActorId:Cookie"

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