"Fossies" - the Fresh Open Source Software Archive

Member "Apache-Session-1.93/lib/Apache/Session/Lock/Null.pm" (15 Sep 2009, 1606 Bytes) of package /linux/www/Apache-Session-1.93.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Null.pm" see the Fossies "Dox" file reference documentation.

    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 
   10 package Apache::Session::Lock::Null;
   11 
   12 use strict;
   13 use 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 
   21 sub new {
   22     my $class = shift;
   23     
   24     return bless {}, $class;
   25 }
   26 
   27 sub acquire_read_lock  {1}
   28 sub acquire_write_lock {1}
   29 sub release_read_lock  {1}
   30 sub release_write_lock {1}
   31 sub release_all_locks  {1}
   32 
   33 1;
   34 
   35 
   36 =pod
   37 
   38 =head1 NAME
   39 
   40 Apache::Session::Lock::Null - Does not actually provides mutual exclusion
   41 
   42 =head1 SYNOPSIS
   43 
   44  use Apache::Session::Lock::Null;
   45 
   46  my $locker = new Apache::Session::Lock::Null;
   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 
   56 Apache::Session::Lock::Null fulfills the locking interface of 
   57 Apache::Session, without actually doing any work.  This is the module to use
   58 if you want maximum performance and don't actually need locking.
   59 
   60 =head1 AUTHOR
   61 
   62 This module was written by Jeffrey William Baker <jwbaker@acm.org>.
   63 
   64 =head1 SEE ALSO
   65 
   66 L<Apache::Session>