class Movie::Cluster::BehaviorEntityProvider(T)

Defined in:

movie/cluster/sharding/provider.cr

Constructors

Instance Method Summary

Instance methods inherited from class Movie::Cluster::ShardedEntityProvider

activate(entity_id : String, shard_id : Int32) : Bool activate, authorize_shard(shard_id : Int32) : Nil authorize_shard, deliver(envelope : ShardingEnvelope, sender : Movie::ActorRefBase | Nil) : Nil deliver, handle_cluster_event(event : ClusterEvent) : Nil handle_cluster_event, local_entity_count : Int32 local_entity_count, message_type_name : String message_type_name, name : String name, passivate(entity_id : String) : Bool passivate, passivate_idle(now : Time::Instant) : Int32 passivate_idle, passivate_shard(shard_id : Int32) : Nil passivate_shard, prepare_shard(shard_id : Int32) : Nil prepare_shard, retain_shards(shard_ids : Set(Int32)) : Nil retain_shards, settings : ShardingSettings settings, stop_all : Nil stop_all, suspend_ownership(release : Bool) : Nil suspend_ownership

Constructor methods inherited from class Movie::Cluster::ShardedEntityProvider

new(name : String, message_type_name : String, settings : ShardingSettings, telemetry : ShardingTelemetry) new

Constructor Detail

def self.new(name : String, settings : ShardingSettings, system : Movie::AbstractActorSystem, telemetry : ShardingTelemetry, &factory : String -> Movie::AbstractBehavior(T)) #

[View source]

Instance Method Detail

def activate(entity_id : String, shard_id : Int32) : Bool #
Description copied from class Movie::Cluster::ShardedEntityProvider

Returns true only when this request created a new local entity instance.


[View source]
def authorize_shard(shard_id : Int32) : Nil #

[View source]
def deliver(envelope : ShardingEnvelope, sender : Movie::ActorRefBase | Nil) : Nil #

[View source]
def local_entity_count : Int32 #

[View source]
def passivate(entity_id : String) : Bool #

[View source]
def passivate_idle(now : Time::Instant) : Int32 #

[View source]
def passivate_shard(shard_id : Int32) : Nil #

[View source]
def prepare_shard(shard_id : Int32) : Nil #

[View source]
def retain_shards(shard_ids : Set(Int32)) : Nil #

[View source]
def stop_all : Nil #

[View source]
def suspend_ownership(release : Bool) : Nil #

[View source]