Nicholas Perez > ShardedKV-0.15 > ShardedKV::Continuum

Download:
ShardedKV-0.15.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.15   Source   Latest Release: ShardedKV-0.20

NAME ^

ShardedKV::Continuum - The continuum role

VERSION ^

version 0.15

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 ^

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 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.

syntax highlighting: