abstract class
Movie::AbstractActorSystem
- Movie::AbstractActorSystem
- Reference
- Object
Direct Known Subclasses
Defined in:
movie.crInstance Method Summary
- #actor_dispatch_enter : Nil
- #actor_dispatch_leave : Nil
- #actor_dispatching_on_current_fiber? : Bool
-
#actor_for(path : ActorPath, type : T.class) : ActorRefBase forall T
Unified actor lookup - returns local or remote actor ref based on path.
-
#actor_for(path_str : String, type : T.class) : ActorRefBase forall T
Convenience overload that parses a path string.
-
#address : Address
The address of this actor system (local by default, remote when remoting is enabled)
- #close_spawn_admission : Nil
- #cluster : Cluster::ClusterExtension | Nil
- #cluster_enabled? : Bool
-
#config : Config
Returns a config instance (empty for systems without config).
- #context(id : Int32)
- #dead_letters : ActorRefBase
- #deregister(id : Int32)
- #dispatchers : DispatcherRegistry
-
#enable_cluster(settings : Cluster::ClusterSettings = Cluster::ClusterSettings.new) : Cluster::ClusterExtension
Enables static-seed cluster membership above an existing remoting extension.
-
#enable_remoting(host : String, port : Int32, stripe_count : Int32 = Remote::StripedConnectionPool::DEFAULT_STRIPE_COUNT, settings : Remote::AssociationSettings = Remote::AssociationSettings.new) : Remote::RemoteExtension
Enables remoting on this actor system.
-
#extension(type : T.class) : T | Nil forall T
Returns an extension by type, or nil if not registered.
-
#extension(id : ExtensionId(T)) : T forall T
Returns an extension via an ExtensionId (Akka-style lazy access).
-
#extension!(type : T.class) : T forall T
Returns an extension by type, raising if not found.
-
#extensions : ExtensionRegistry
Registry for system extensions
-
#local_path?(path : ActorPath) : Bool
Checks if a path refers to this local system.
- #mailboxes : MailboxManager
-
#name : String
The unique name of this actor system
- #next_id
-
#path_registry : PathRegistry
Registry for actor paths (both local and remote lookups)
-
#publish_remoting_address(address : Address) : Nil
Publishes the actual address selected by a remoting extension and rebinds every existing local actor path to it.
-
#register_context(id : Int32, context : AbstractActorContext)
Registers an actor context in the system registry
-
#register_extension(extension : Extension)
Registers an extension with this actor system.
-
#remote : Remote::RemoteExtension | Nil
Returns the remote extension if remoting is enabled.
-
#remoting_enabled? : Bool
Returns true if remoting is enabled.
-
#scheduler : Scheduler
Returns the system scheduler for scheduling timers and delayed tasks.
- #shutting_down? : Bool
-
#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.
-
#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.
-
#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.)
-
#system_actor(name : String, type : T.class) : ActorRefBase forall T
Convenience method to lookup an actor under /system/{name}
-
#user_actor(name : String, type : T.class) : ActorRefBase forall T
Convenience method to lookup an actor under /user/{name}
- #with_spawn_admission(&)
Instance Method Detail
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
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
The address of this actor system (local by default, remote when remoting is enabled)
Enables static-seed cluster membership above an existing remoting extension. Repeated calls return the same extension instance.
Enables remoting on this actor system. Returns the RemoteExtension for configuring remote communication.
Returns an extension by type, or nil if not registered. Example: system.extension(Remote::RemoteExtension)
Returns an extension via an ExtensionId (Akka-style lazy access). Example: Movie::Remote::Remoting.get(system)
Returns an extension by type, raising if not found.
Checks if a path refers to this local system.
Publishes the actual address selected by a remoting extension and rebinds every existing local actor path to it.
Registers an actor context in the system registry
Registers an extension with this actor system. The extension will be started immediately and stopped when the system shuts down.
Returns the remote extension if remoting is enabled. Convenience method - equivalent to extension(Remote::RemoteExtension)
Returns the system scheduler for scheduling timers and delayed tasks. Uses a dedicated scheduler dispatcher for execution.
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.
Spawns an actor under the user guardian with an explicit supervision config.
Spawns a system actor under /system/{name} System actors are internal framework actors (scheduler, dead letters, etc.)
Convenience method to lookup an actor under /system/{name}
Convenience method to lookup an actor under /user/{name}