NAME
Memcached::Client::Connection - Class to manage Memcached::Client server connections
VERSION
version 0.99
SYNOPSIS
use Memcached::Client::Connection;
my $connection = Memcached::Client::Connection->new ("server:port");
$connection->enqueue ($request->($handle, $callback), $failback);
METHODS
new
new()
builds a new connection object.
Its only parameter is the server specification, in the form of "hostname:port". The object is constructed and returns immediately.
connect
connect()
initiates a connection to the specified server.
If it succeeds, it will start dequeuing requests for the server to satisfy.
If it fails, it will respond to all outstanding requests by invoking their failback routine.
enqueue
enqueue()
adds the request specified (request, failback) pair to the queue of requests to be processed.
dequeue
dequeue()
manages the process of pulling requests off the queue and executing them as possible. Each request is handed the handle for the server connection as well as a callback that will mark it as done and do the next request.
If the request code fails to invoke this callback, processing will halt.
fail
fail()
is called when there is an error on the handle, and it invokes the failbacks of all queued requests.
AUTHOR
Michael Alan Dorman <mdorman@ironicdesign.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Michael Alan Dorman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.