struct
Movie::Cluster::ShardingEnvelope
- Movie::Cluster::ShardingEnvelope
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
movie/cluster/sharding/model.crConstructors
- .activate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self
- .handoff_complete(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : 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)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .passivate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self
- .passivate_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : self
- .plan_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self
- .plan_snapshot(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self
- .plan_snapshot_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self
- .plan_update(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self
- .prepare_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress) : self
Instance Method Summary
- #as_ask(timeout : Time::Span) : self
- #ask_timeout_ms : Int64 | Nil
- #assignments : Array(ShardAssignment)
- #coordinator : UniqueAddress | Nil
- #delivery_attempt : Int32
- #entity_id : String
- #entity_type : String
- #forwarded(coordinator : UniqueAddress, senderless : Bool = false) : self
- #hop_count : Int32
- #kind : Kind
- #message : ShardingMessage
- #next_owner : UniqueAddress | Nil
- #plan_generation : Int64
- #requester : UniqueAddress | Nil
- #rerouted : self
- #senderless : Bool
- #settings_key : String
- #shard_id : Int32
Constructor Detail
def self.activate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self
#
def self.handoff_complete(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : self
#
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)
#
def self.passivate(entity_type : String, entity_id : String, shard_id : Int32, settings_key : String) : self
#
def self.passivate_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress, next_owner : UniqueAddress | Nil) : self
#
def self.plan_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self
#
def self.plan_snapshot(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self
#
def self.plan_snapshot_request(entity_type : String, settings_key : String, requester : UniqueAddress) : self
#
def self.plan_update(entity_type : String, settings_key : String, coordinator : UniqueAddress, generation : Int64, allocations : ShardAllocations) : self
#
def self.prepare_shard(entity_type : String, shard_id : Int32, settings_key : String, coordinator : UniqueAddress) : self
#