NAME
ShardedKV::Continuum - The continuum role
VERSION
version 0.10
SYNOPSIS
package ShardedKV::Continuum::MyAlgorithm;
use Moose;
with 'ShardedKV::Continuum';
... implement necessary methods here ...
1;
DESCRIPTION
A class that consumes this role and implements all required methods correctly can be used as a sharding algorithm for a ShardedKV.
See ShardedKV::Continuum::Ketama for an example.
ROLE REQUIRES
choose
Given a key name, must return the name of the shard that the key lives on.
clone
Returns a deep copy of the object.
extend
Given one or multiple shard specifications, adds these to the continuum.
serialize
Returns a string that could be used to recreate the continuum.
deserialize
Given such a string, recreates the exact same continuum.
get_bucket_names
Returns a list of all shard/bucket names in the continuum.
SEE ALSO
AUTHORS
Steffen Mueller <smueller@cpan.org>
Nick Perez <nperez@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Steffen Mueller.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.