Name
IPC::SRLock::Memcached - Set/reset locks using libmemcache
Version
0.8.$Revision: 194 $
Synopsis
use IPC::SRLock;
my $config = { tempdir => q(path_to_tmp_directory), type => q(memcached) };
my $lock_obj = IPC::SRLock->new( $config );
Description
Uses Cache::Memcached to implement a distributed lock manager
Configuration and Environment
This class defines accessors and mutators for these attributes:
- lockfile
-
Name of the key to the lock file record. Defaults to _lockfile
- memd
-
An instance of Cache::Memcached with it's namespace set to ipc_srlock
- servers
-
An array ref of servers to connect to. Defaults to localhost:11211
- shmfile
-
Name of the key to the lock table record. Defaults to _shmfile
Subroutines/Methods
_init
Initialise the object
_list
List the contents of the lock table
_reset
Delete a lock from the lock table
_set
Set a lock in the lock table
_sleep_or_throw
Sleep for a bit or throw a timeout exception
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
License and Copyright
Copyright (c) 2008 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE