1############################################################################ 2# 3# Apache::Session::Lock::Null 4# Pretends to provide locking for Apache::Session 5# Copyright(c) 1998, 1999, 2000 Jeffrey William Baker (jwbaker@acm.org) 6# Distribute under the Perl License 7# 8############################################################################ 9 10package Apache::Session::Lock::Null; 11 12use strict; 13use vars qw($VERSION); 14 15$VERSION = '1.01'; 16 17#This package is fake. It fulfills the API that Apache::Session 18#outlines but doesn't actually do anything, least of all provide 19#serialized access to your data store. 20 21sub new { 22 my $class = shift; 23 24 return bless {}, $class; 25} 26 27sub acquire_read_lock {1} 28sub acquire_write_lock {1} 29sub release_read_lock {1} 30sub release_write_lock {1} 31sub release_all_locks {1} 32 331; 34 35 36=pod 37 38=head1 NAME 39 40Apache::Session::Lock::Null - Does not actually provides mutual exclusion 41 42=head1 SYNOPSIS 43 44 use Apache::Session::Lock::Null; 45 46 my $locker = Apache::Session::Lock::Null->new; 47 48 $locker->acquire_read_lock($ref); 49 $locker->acquire_write_lock($ref); 50 $locker->release_read_lock($ref); 51 $locker->release_write_lock($ref); 52 $locker->release_all_locks($ref); 53 54=head1 DESCRIPTION 55 56Apache::Session::Lock::Null fulfills the locking interface of 57Apache::Session, without actually doing any work. This is the module to use 58if you want maximum performance and don't actually need locking. 59 60=head1 AUTHOR 61 62This module was written by Jeffrey William Baker <jwbaker@acm.org>. 63 64=head1 SEE ALSO 65 66L<Apache::Session> 67