pub struct ActorRegistry<R: Reactor> { /* private fields */ }Expand description
Central registry for all actors in the engine (REQ-014).
Uses sharded concurrent maps for deterministic iteration order (shard 0..16, insertion order within each shard) while still supporting concurrent access.
Implementations§
Source§impl<R: Reactor> ActorRegistry<R>
impl<R: Reactor> ActorRegistry<R>
pub fn new() -> Self
Sourcepub fn next_generation(&self) -> u64
pub fn next_generation(&self) -> u64
Assign a unique generation ID for a new actor.
pub fn insert(&self, slot: ActorSlot<R>)
pub fn remove(&self, addr: AddrHash) -> Option<Arc<ActorSlot<R>>>
pub fn get_by_addr(&self, addr: AddrHash) -> Option<Arc<ActorSlot<R>>>
pub fn get_by_path(&self, path: &ActorPath) -> Option<Arc<ActorSlot<R>>>
pub fn update_running(&self, addr: AddrHash, running: bool)
Sourcepub fn increment_restart_count(&self, addr: AddrHash)
pub fn increment_restart_count(&self, addr: AddrHash)
Increment the restart counter for an actor (called by supervisor on restart).
Trait Implementations§
Auto Trait Implementations§
impl<R> !Freeze for ActorRegistry<R>
impl<R> !RefUnwindSafe for ActorRegistry<R>
impl<R> Send for ActorRegistry<R>
impl<R> Sync for ActorRegistry<R>
impl<R> Unpin for ActorRegistry<R>
impl<R> UnsafeUnpin for ActorRegistry<R>
impl<R> !UnwindSafe for ActorRegistry<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more