Value object representing hash ring configuration.
Summary
Functions
Calculates virtual node count for a node based on its weight.
Gets the hash algorithm.
Gets the hash mask.
Gets the max hash byte size.
Gets the virtual node count.
Creates a new hash configuration.
Types
@type t() :: %ExRingRing.Domain.ValueObjects.HashConfig{ algorithm: atom(), hash_mask: non_neg_integer(), max_hash_byte_size: pos_integer(), virtual_node_count: pos_integer() }
Functions
@spec calc_virtual_node_count(t(), ExRingRing.Domain.Entities.Node.t()) :: non_neg_integer()
Calculates virtual node count for a node based on its weight.
Gets the hash algorithm.
@spec get_hash_mask(t()) :: non_neg_integer()
Gets the hash mask.
@spec get_max_hash_byte_size(t()) :: pos_integer()
Gets the max hash byte size.
@spec get_virtual_node_count(t()) :: pos_integer()
Gets the virtual node count.
Creates a new hash configuration.