Skip to main content

MultiCoreHandle

Struct MultiCoreHandle 

Source
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>

Source

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.

Source

pub fn transport(&self) -> &Arc<InProcessTransport>

Access the shared transport directly.

Source

pub fn placement(&self) -> &Arc<PlacementMap>

Access the placement map.

Source

pub fn actor_list(&self, query: ActorQuery) -> Vec<ActorInfo>

List actors, optionally filtered.

Source

pub fn actor_info(&self, path: &ActorPath) -> Option<ActorInfo>

Get info for a single actor by path.

Source

pub fn snapshot(&self) -> EngineSnapshot

System-level snapshot aggregated across all cores.

Source

pub fn core_stats(&self) -> &[Arc<CoreStats>]

Per-core statistics counters.

Source

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.

Source

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()).

Source

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.

Auto Trait Implementations§

§

impl<F, R> Freeze for MultiCoreHandle<F, R>
where F: Freeze, R: Freeze,

§

impl<F = TokioFileSystem, R = TokioReactor> !RefUnwindSafe for MultiCoreHandle<F, R>

§

impl<F, R> Send for MultiCoreHandle<F, R>

§

impl<F, R> Sync for MultiCoreHandle<F, R>

§

impl<F, R> Unpin for MultiCoreHandle<F, R>
where F: Unpin, R: Unpin,

§

impl<F, R> UnsafeUnpin for MultiCoreHandle<F, R>
where F: UnsafeUnpin, R: UnsafeUnpin,

§

impl<F = TokioFileSystem, R = TokioReactor> !UnwindSafe for MultiCoreHandle<F, R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

Source§

fn upcast(self) -> T

Source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

Source§

fn upcast_from(value: Counter<T, B>) -> T

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V