class Movie::Cluster::SingletonPartitioner

Overview

A singleton always occupies shard zero, while its identity is embedded in the sharding compatibility key so nodes cannot silently disagree on the backing entity id or persistence mode.

Defined in:

movie/cluster/singleton/model.cr

Constructors

Instance Method Summary

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

configuration_key : String configuration_key, shard_for(entity_type : String, entity_id : String, shard_count : Int32) : Int32 shard_for

Constructor Detail

def self.new(identity : SingletonBackingIdentity, entity_id : String) #

[View source]

Instance Method Detail

def configuration_key : String #

[View source]
def shard_for(entity_type : String, entity_id : String, shard_count : Int32) : Int32 #

[View source]