Daisuke Maki > Algorithm-ConsistentHash-Ketama-0.00010 > Algorithm::ConsistentHash::Ketama::Bucket

Download:
Algorithm-ConsistentHash-Ketama-0.00010.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

Algorithm::ConsistentHash::Ketama::Bucket - A Bucket Object

SYNOPSIS ^

    my @buckets = $ketama->buckets;

    my $bucket = shift @buckets;
    $bucket->label;
    $bucket->weight;

DESCRIPTION ^

This class simply represents a bucket in Algorithm::ConsistentnHash::Ketama. There are no interface to add a bucket using this object. This class is just a utility to represent this data.

METHODS ^

new

Creates a new bucket object

label

Returns the string label for this bucket

weight

Returns the weight of this bucket

syntax highlighting: