struct Movie::Cluster::ShardingEnvelope

Included Modules

Defined in:

movie/cluster/sharding/model.cr

Constructors

Instance Method Summary

Constructor Detail

def self.activate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self #

[View source]
def self.handoff_complete(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : self #

[View source]
def self.new(entity_type : String, entity_id : String, shard_id : Int32, message : ShardingMessage, settings_key : String, hop_count : Int32 = 0, kind : Kind = Kind::User, delivery_attempt : Int32 = 0, coordinator : UniqueAddress | Nil = nil, requester : UniqueAddress | Nil = nil, next_owner : UniqueAddress | Nil = nil, assignments : Array(ShardAssignment) = [] of ShardAssignment, ask_timeout_ms : Int64 | Nil = nil, plan_generation : Int64 = 0_i64, senderless : Bool = false) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]
def self.passivate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self #

[View source]
def self.passivate_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : self #

[View source]
def self.plan_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self #

[View source]
def self.plan_snapshot(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self #

[View source]
def self.plan_snapshot_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self #

[View source]
def self.plan_update(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self #

[View source]
def self.prepare_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress) : self #

[View source]

Instance Method Detail

def as_ask(timeout : Time::Span) : self #

[View source]
def ask_timeout_ms : Int64 | Nil #

[View source]
def assignments : Array(ShardAssignment) #

[View source]
def coordinator : UniqueAddress | Nil #

[View source]
def delivery_attempt : Int32 #

[View source]
def entity_id : String #

[View source]
def entity_type : String #

[View source]
def forwarded(coordinator : UniqueAddress, senderless : Bool = false) : self #

[View source]
def hop_count : Int32 #

[View source]
def kind : Kind #

[View source]
def message : ShardingMessage #

[View source]
def next_owner : UniqueAddress | Nil #

[View source]
def plan_generation : Int64 #

[View source]
def requester : UniqueAddress | Nil #

[View source]
def rerouted : self #

[View source]
def senderless : Bool #

[View source]
def settings_key : String #

[View source]
def shard_id : Int32 #

[View source]