File Coverage

blib/lib/Pixie/LockStrat/Exclusive.pm
Criterion Covered Total %
statement 9 10 90.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 2 0.0
total 12 16 75.0


line stmt bran cond sub pod time code
1             ##
2             # NAME
3             # Pixie::LockStrat::Exclusive - exclusive locking strategy for Pixie
4             #
5             # SYNOPSIS
6             # use Pixie::LockStrat::Exclusive;
7             # # see Pixie::LockStrat;
8             #
9             # DESCRIPTION
10             # This class implements a locking strategy where:
11             #
12             # * get's are locked until you release the lock
13             # (ie: until this object is destroyed)
14             # * store's are locked 'atomically'
15             #
16             ##
17              
18             package Pixie::LockStrat::Exclusive;
19              
20 5     5   114465 use strict;
  5         12  
  5         218  
21              
22 5     5   27 use base qw( Pixie::LockStrat );
  5         10  
  5         2291  
23              
24             our $VERSION = '2.08_02';
25              
26             sub pre_get {
27 1     1 0 93 my $self = shift;
28 1         3 my($oid,$pixie) = @_;
29 1         12 $pixie->store->lock_object_for($oid, $pixie);
30             }
31              
32 0     0 0   sub post_get {
33             }
34              
35             1;