class Movie::Cluster::AllocationPlanner

Overview

Builds the deterministic target allocation selected by a strategy, then advances an existing allocation by the number of moves permitted by the independent rebalance policy. Shards on ineligible owners always move.

Defined in:

movie/cluster/sharding/strategies.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(shard_count : Int32, allocation : ShardAllocationStrategy, rebalance : RebalancePolicy) #

[View source]

Instance Method Detail

def initial(members : Array(Member)) : ShardAllocations #

[View source]
def reconcile(current : ShardAllocations, members : Array(Member)) : AllocationPlanResult #

[View source]