abstract class Movie::Cluster::ShardAllocationStrategy

Overview

Chooses an owner for a shard from the currently eligible membership. Implementations are invoked in shard-id order when a complete allocation plan is built, so strategies may use the allocations already selected.

Direct Known Subclasses

Defined in:

movie/cluster/sharding/strategies.cr

Instance Method Summary

Instance Method Detail

abstract def allocate(shard_id : Int32, members : Array(Member), current_allocations : ShardAllocations) : UniqueAddress | Nil #

[View source]
def configuration_key : String #

[View source]