class

Movie::AbstractActorSystem

Inherits Reference < Object

Instance methods

actor_for(path : ActorPath, type : T.class) : ActorRefBase forall T

Unified actor lookup - returns local or remote actor ref based on path. For local paths (matching this system's address), returns the local ActorRef. For remote paths, returns a RemoteActorRef that transparently handles serialization.

Example: ref = system.actor_for("movie.tcp://my-system@localhost:9000/user/worker", MyMessage) ref << MyMessage.new # Works for both local and remote

Source
actor_for(path_str : String, type : T.class) : ActorRefBase forall T

Convenience overload that parses a path string. Supports multiple formats:

  • Full URI: "movie://system/user/ping" or "movie.tcp://system@host:port/user/ping"
  • Absolute path: "/user/ping" → auto-prepends local system address
  • Relative path: "user/ping" → auto-prepends local system address
Source
address

The address of this actor system (local by default, remote when remoting is enabled)

Source
config

Returns a config instance (empty for systems without config).

Source
context(id : Int32)
Source
dead_letters
Source
deregister(id : Int32)
Source
dispatchers
Source
enable_remoting(host : String, port : Int32, stripe_count : Int32 = Remote::StripedConnectionPool::DEFAULT_STRIPE_COUNT) : Remote::RemoteExtension

Enables remoting on this actor system. Returns the RemoteExtension for configuring remote communication.

Source
extension(type : T.class) : T | Nil forall T

Returns an extension by type, or nil if not registered. Example: system.extension(Remote::RemoteExtension)

Source
extension(id : ExtensionId(T)) : T forall T

Returns an extension via an ExtensionId (Akka-style lazy access). Example: Movie::Remote::Remoting.get(system)

Source
extension!(type : T.class) : T forall T

Returns an extension by type, raising if not found.

Source
extensions

Registry for system extensions

Source
local_path?(path : ActorPath) : Bool

Checks if a path refers to this local system.

Source
mailboxes
Source
name

The unique name of this actor system

Source
next_id
Source
path_registry

Registry for actor paths (both local and remote lookups)

Source
register_context(id : Int32, context : AbstractActorContext)

Registers an actor context in the system registry

Source
register_extension(extension : Extension)

Registers an extension with this actor system. The extension will be started immediately and stopped when the system shuts down.

Source
remote

Returns the remote extension if remoting is enabled. Convenience method - equivalent to extension(Remote::RemoteExtension)

Source
remoting_enabled?

Returns true if remoting is enabled.

Source
scheduler

Returns the system scheduler for scheduling timers and delayed tasks. Uses a dedicated scheduler dispatcher for execution.

Source
spawn(behavior : AbstractBehavior(U), restart_strategy : RestartStrategy = RestartStrategy::RESTART, name : String | Nil = nil) : ActorRef(U) forall U

Spawns an actor under the user guardian using registry defaults. Available on AbstractActorSystem so extensions can spawn helper actors without depending on a concrete root message type.

Source
spawn(behavior : AbstractBehavior(U), restart_strategy : RestartStrategy, supervision_config : SupervisionConfig, name : String | Nil = nil) : ActorRef(U) forall U

Spawns an actor under the user guardian with an explicit supervision config.

Source
spawn_system_actor(behavior : AbstractBehavior(T), name : String, restart_strategy : RestartStrategy = RestartStrategy::RESTART, supervision_config : SupervisionConfig = SupervisionConfig.default) : ActorRef(T) forall T

Spawns a system actor under /system/{name} System actors are internal framework actors (scheduler, dead letters, etc.)

Source
system_actor(name : String, type : T.class) : ActorRefBase forall T

Convenience method to lookup an actor under /system/{name}

Source
user_actor(name : String, type : T.class) : ActorRefBase forall T

Convenience method to lookup an actor under /user/{name}

Source