tion based on ketama consistent hashing
use Algorithm::ConsistentHash::Ketama;
use JSON::XS qw(encode_json decode_json);
with 'ShardedKV::Continuum';
has '_orig_continuum_spec' => (
is => 'ro',
);
lose the logger!") if $logger;
encode_json( $self->_orig_continuum_spec )
}
sub deserialize {
my $class = shift;
return $class->new(from => decode_json( $_[1] ));
}
sub clone {
my $self = s
RACT: A continuum strategy based on a simple "significant bits" static mapping
use JSON::XS qw(encode_json decode_json);
use Array::IntSpan;
use POSIX ();
with 'ShardedKV::Continuum';
has 'num_signi
ncode_json( {
num_significant_bits => $_[0]->num_significant_bits,
from => $_[0]->_original_range_mapping
} )
}
sub deserialize {
my $class = shift;
return $class->new(decode_json( $_[1