class
Movie::ClusterReceptionistExtension
- Movie::ClusterReceptionistExtension
- Movie::Extension
- Reference
- Object
Defined in:
movie/cluster/receptionist/extension.crmovie/cluster/receptionist/replication.cr
Constant Summary
-
DAEMON_NAME =
"receptionist" -
EVENT_LISTENER_NAME =
"receptionist-events" -
Log =
::Log.for(self) -
PROTOCOL_TAG =
"movie.cluster.receptionist.envelope.v1" -
SYNC_INTERVAL =
250.milliseconds -
WATCHER_NAME =
"receptionist-watcher"
Constructors
Instance Method Summary
-
#deregister(key : Cluster::ServiceKey(T), actor : ActorRef(T)) : Bool forall T
Removes one local actor registration.
-
#find(key : Cluster::ServiceKey(T)) : Cluster::ReceptionistListing(T) forall T
Returns a defensive, deterministically ordered snapshot of reachable services currently visible from this node.
- #handle_cluster_event(event : Cluster::ClusterEvent) : Nil
- #handle_envelope(envelope : Cluster::ReceptionistEnvelope, sender_path : ActorPath | Nil, remote_address : Address | Nil, remote_node_uid : String | Nil) : Nil
-
#local_actor_terminated(actor : ActorRefBase) : Nil
Internal watcher entrypoint.
-
#register(key : Cluster::ServiceKey(T), actor : ActorRef(T)) : Bool forall T
Registers a local actor under a typed cluster-wide service key.
-
#start : Bool
Called when the extension is registered with the system.
- #stats : Cluster::ReceptionistStats
-
#stop : Nil
Called when the system is shutting down.
-
#subscribe(key : Cluster::ServiceKey(T), subscriber : ActorRef(Cluster::ReceptionistListing(T))) : Bool forall T
Subscribes a local typed actor and immediately publishes the current listing.
-
#unsubscribe(key : Cluster::ServiceKey(T), subscriber : ActorRef(Cluster::ReceptionistListing(T))) : Bool forall T
Removes an exact local typed subscription.
Constructor Detail
Instance Method Detail
Removes one local actor registration. Repeated removal is idempotent.
Returns a defensive, deterministically ordered snapshot of reachable services currently visible from this node.
Registers a local actor under a typed cluster-wide service key.
Called when the extension is registered with the system. Override to perform initialization.
Called when the system is shutting down. Override to cleanup resources (close connections, stop services, etc.)
Subscribes a local typed actor and immediately publishes the current listing. Returns false when the exact subscription already exists.
Removes an exact local typed subscription.