class
Movie::ClusterSingletonExtension
- Movie::ClusterSingletonExtension
- Movie::Extension
- Reference
- Object
Defined in:
movie/cluster/singleton/extension.crmovie/persistence/singleton.cr
Constant Summary
-
ENTITY_ID =
"singleton" -
INTERNAL_PREFIX =
"movie.singleton." -
Log =
::Log.for(self)
Constructors
Instance Method Summary
- #ensure_active(name : String) : Nil
- #handoff_in_progress?(name : String) : Bool
- #init(name : String, message_type : T.class, roles : Array(String) = [] of String, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds, &factory : -> AbstractBehavior(T)) : Cluster::ClusterSingletonRef(T) forall T
- #init_durable_state(name : String, entity_type : Persistence::EntityType(T), entity_id : String = name, roles : Array(String) = [] of String, lease_duration : Time::Span = 10.seconds, lease_renew_interval : Time::Span = 3.seconds, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds) : Cluster::ClusterSingletonRef(T) forall T
- #init_event_sourced(name : String, entity_type : Persistence::EntityType(T), entity_id : String = name, roles : Array(String) = [] of String, lease_duration : Time::Span = 10.seconds, lease_renew_interval : Time::Span = 3.seconds, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds) : Cluster::ClusterSingletonRef(T) forall T
- #last_activation_error(name : String) : String | Nil
- #locally_owned?(name : String) : Bool
- #owner(name : String) : Cluster::UniqueAddress | Nil
- #record_ask : Nil
- #record_routing_rejection(error : Exception) : Nil
- #record_stop : Nil
-
#record_tell : Nil
Internal proxy instrumentation entrypoints.
-
#start : Bool
Called when the extension is registered with the system.
- #stats : Cluster::SingletonStats
-
#stop : Nil
Called when the system is shutting down.
Constructor Detail
Instance Method Detail
def init(name : String, message_type : T.class, roles : Array(String) = [] of String, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds, &factory : -> AbstractBehavior(T)) : Cluster::ClusterSingletonRef(T) forall T
#
def init_durable_state(name : String, entity_type : Persistence::EntityType(T), entity_id : String = name, roles : Array(String) = [] of String, lease_duration : Time::Span = 10.seconds, lease_renew_interval : Time::Span = 3.seconds, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds) : Cluster::ClusterSingletonRef(T) forall T
#
def init_event_sourced(name : String, entity_type : Persistence::EntityType(T), entity_id : String = name, roles : Array(String) = [] of String, lease_duration : Time::Span = 10.seconds, lease_renew_interval : Time::Span = 3.seconds, activation_interval : Time::Span = 250.milliseconds, activation_timeout : Time::Span = 2.seconds) : Cluster::ClusterSingletonRef(T) forall T
#
def start : Bool
#
Description copied from class Movie::Extension
Called when the extension is registered with the system. Override to perform initialization.
def stop : Nil
#
Description copied from class Movie::Extension
Called when the system is shutting down. Override to cleanup resources (close connections, stop services, etc.)