NAME

Labrador::Common::URLAlloc::Delay

SYNOPSIS

	use Labrador::Common::URLAlloc;
	use Labrador::Common::URLAlloc::Delay;
	my $urlalloc = Labrador::Common::URLAlloc::new(
		'Labrador::Common::URLAlloc::Delay',
		$data, $urlstates, $config);
	$urlalloc->new_url('http://www.gla.ac.uk/#');
	print $urlalloc->get_url();

DESCRIPTION

This is a URLAlloc class implementing Host Delay support. Queuing is done in a breadth-first fashion, but without respect only for hosts. Queues between hosts are ignored.

NB: Not all methods are described here, some are inherited from URLAlloc parent class.

METHODS

init()

Initialisatoin. Called automatically by new()

next()

How long to wait until the next URL will be ready to fetch

new_url($url)

Enqueue $url

new_urls(@urls)

Enqueue all the @urls.

get_urls([$count])

Retrieves as many URLs upto $count as are allowed based on the delay line.

queue_size()

Returns the size of all the host queues, and if called in array context, how many hosts are queued in the delay line.

empty_queues

Empties all the queues

REVISION

	$Revision: 1.6 $