pub struct MultiCoreHandle<F: FileSystem = TokioFileSystem, R: Reactor = TokioReactor> { /* private fields */ }Expand description
Handle for a running [MultiCoreEngine].
Provides access to the shared transport, registry, and placement map, plus graceful shutdown.
Implementations§
Source§impl<F: FileSystem, R: Reactor> MultiCoreHandle<F, R>
impl<F: FileSystem, R: Reactor> MultiCoreHandle<F, R>
Sourcepub fn engine_handle(&self) -> EngineHandle<R, TokioNetwork, F>
pub fn engine_handle(&self) -> EngineHandle<R, TokioNetwork, F>
Return an EngineHandle backed by this engine’s shared transport.
Useful in tests to build Addr<M> objects and interact with actors.
Sourcepub fn transport(&self) -> &Arc<InProcessTransport>
pub fn transport(&self) -> &Arc<InProcessTransport>
Access the shared transport directly.
Sourcepub fn placement(&self) -> &Arc<PlacementMap>
pub fn placement(&self) -> &Arc<PlacementMap>
Access the placement map.
Sourcepub fn actor_list(&self, query: ActorQuery) -> Vec<ActorInfo>
pub fn actor_list(&self, query: ActorQuery) -> Vec<ActorInfo>
List actors, optionally filtered.
Sourcepub fn actor_info(&self, path: &ActorPath) -> Option<ActorInfo>
pub fn actor_info(&self, path: &ActorPath) -> Option<ActorInfo>
Get info for a single actor by path.
Sourcepub fn snapshot(&self) -> EngineSnapshot
pub fn snapshot(&self) -> EngineSnapshot
System-level snapshot aggregated across all cores.
Sourcepub fn core_stats(&self) -> &[Arc<CoreStats>]
pub fn core_stats(&self) -> &[Arc<CoreStats>]
Per-core statistics counters.
Sourcepub fn wait_for_actor(&self, path: &ActorPath, timeout: Duration) -> bool
pub fn wait_for_actor(&self, path: &ActorPath, timeout: Duration) -> bool
Block until actor at path is running, or timeout elapses.
Returns true if the actor became running within timeout.
Sourcepub fn run(self) -> Result<(), ShutdownError>
pub fn run(self) -> Result<(), ShutdownError>
Block until the engine shuts down, then gracefully stop all cores.
Waits for the internal shutdown signal (fired by the control plane’s
engine.stop RPC) and then calls shutdown.
If no control plane socket was configured, this method returns
immediately (the caller is responsible for calling shutdown()).
Sourcepub fn shutdown(self) -> Result<(), ShutdownError>
pub fn shutdown(self) -> Result<(), ShutdownError>
Gracefully shut down all cores.
Sends shutdown signals to every core, waits for threads to join, then performs brutal cancellation of any remaining actor tasks.