NAME

Labrador::Common::Partition

DESCRIPTION

Base class for all partitioning schemes. URLs are only in a crawler's partition if the URLs of the same hash value have been assigned to it.

METHODS

new($data)

Constructor. Automagically calls init().

init()

Loads data structures.

new_urls($partition, @urls)

Registers the hash values of the given URLs to the provided partition.

asssigned($url)

Returns true if the hash of $url has been assigned to a partition

delete_partition($partition)

This is expensive, TRUST ME

hash($url)

Returns the value to be hashed on.

size($partition)

Returns the number of hash values assigned to the partition named $partition. Returns 0 if the $partition is unknown.

sizes()

Returns a hash of partition sizes.

REVISION

	$Revision: 1.4 $