class Movie::ClusterSingletonExtension

Defined in:

movie/cluster/singleton/extension.cr
movie/persistence/singleton.cr

Constant Summary

ENTITY_ID = "singleton"
INTERNAL_PREFIX = "movie.singleton."
Log = ::Log.for(self)

Constructors

Instance Method Summary

Instance methods inherited from class Movie::Extension

start start, stop stop

Constructor Detail

def self.new(system : AbstractActorSystem) #

[View source]

Instance Method Detail

def ensure_active(name : String) : Nil #

[View source]
def handoff_in_progress?(name : String) : Bool #

[View source]
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 #

[View source]
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 #

[View source]
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 #

[View source]
def last_activation_error(name : String) : String | Nil #

[View source]
def locally_owned?(name : String) : Bool #

[View source]
def owner(name : String) : Cluster::UniqueAddress | Nil #

[View source]
def record_ask : Nil #

[View source]
def record_routing_rejection(error : Exception) : Nil #

[View source]
def record_stop : Nil #

[View source]
def record_tell : Nil #

Internal proxy instrumentation entrypoints.


[View source]
def start : Bool #
Description copied from class Movie::Extension

Called when the extension is registered with the system. Override to perform initialization.


[View source]

[View source]
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.)


[View source]