1Mail::Box::Locker::POSIUXs(e3r)Contributed Perl DocumentMaatiilo:n:Box::Locker::POSIX(3)
2
3
4

NAME

6       Mail::Box::Locker::POSIX - lock a folder using kernel file-locking
7

INHERITANCE

9        Mail::Box::Locker::POSIX
10          is a Mail::Box::Locker
11          is a Mail::Reporter
12

SYNOPSIS

14        See Mail::Box::Locker
15

DESCRIPTION

17       This locker object is created by the folder to get an exclusive lock on
18       the file which contains the data using the kernel's POSIX facilities.
19       This lock is created on a separate file-handle to the folder file, so
20       not the handle which is reading.  Not all platforms support POSIX lock‐
21       ing.
22

METHODS

24       Constructors
25
26       Mail::Box::Locker::POSIX->new(OPTIONS)
27
28        Option --Defined in     --Default
29        expires  Mail::Box::Locker  1 hour
30        file     Mail::Box::Locker  undef
31        folder   Mail::Box::Locker  <required>
32        log      Mail::Reporter   'WARNINGS'
33        method   Mail::Box::Locker  POSIX
34        timeout  Mail::Box::Locker  10 seconds
35        trace    Mail::Reporter   'WARNINGS'
36
37           . expires SECONDS
38
39           . file FILENAME
40
41           . folder FOLDER
42
43           . log LEVEL
44
45           . method STRING⎪CLASS⎪ARRAY
46
47           . timeout SECONDS⎪'NOTIMEOUT'
48
49           . trace LEVEL
50
51       The Locker
52
53       $obj->filename([FILENAME])
54
55           See "The Locker" in Mail::Box::Locker
56
57       $obj->folder
58
59           See "The Locker" in Mail::Box::Locker
60
61       $obj->name
62
63           See "The Locker" in Mail::Box::Locker
64
65       Locking
66
67       $obj->hasLock
68
69           See "Locking" in Mail::Box::Locker
70
71       $obj->isLocked
72
73       $obj->lock
74
75       $obj->unlock
76
77           See "Locking" in Mail::Box::Locker
78
79       Error handling
80
81       $obj->AUTOLOAD
82
83           See "Error handling" in Mail::Reporter
84
85       $obj->addReport(OBJECT)
86
87           See "Error handling" in Mail::Reporter
88
89       $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
90
91       Mail::Box::Locker::POSIX->defaultTrace([LEVEL]⎪[LOGLEVEL,
92       TRACELEVEL]⎪[LEVEL, CALLBACK])
93
94           See "Error handling" in Mail::Reporter
95
96       $obj->errors
97
98           See "Error handling" in Mail::Reporter
99
100       $obj->log([LEVEL [,STRINGS]])
101
102       Mail::Box::Locker::POSIX->log([LEVEL [,STRINGS]])
103
104           See "Error handling" in Mail::Reporter
105
106       $obj->logPriority(LEVEL)
107
108       Mail::Box::Locker::POSIX->logPriority(LEVEL)
109
110           See "Error handling" in Mail::Reporter
111
112       $obj->logSettings
113
114           See "Error handling" in Mail::Reporter
115
116       $obj->notImplemented
117
118           See "Error handling" in Mail::Reporter
119
120       $obj->report([LEVEL])
121
122           See "Error handling" in Mail::Reporter
123
124       $obj->reportAll([LEVEL])
125
126           See "Error handling" in Mail::Reporter
127
128       $obj->trace([LEVEL])
129
130           See "Error handling" in Mail::Reporter
131
132       $obj->warnings
133
134           See "Error handling" in Mail::Reporter
135
136       Cleanup
137
138       $obj->DESTROY
139
140           See "Cleanup" in Mail::Box::Locker
141
142       $obj->inGlobalDestruction
143
144           See "Cleanup" in Mail::Reporter
145

DIAGNOSTICS

147       Warning: Folder $folder already lockf'd
148
149       Error: Package $package does not implement $method.
150
151       Fatal error: the specific package (or one of its superclasses) does not
152       implement this method where it should. This message means that some
153       other related classes do implement this method however the class at
154       hand does not.  Probably you should investigate this and probably
155       inform the author of the package.
156
157       Error: Unable to check lock file $filename for $folder: $!
158
159       To check whether the filename is used to flock a folder, the file must
160       be opened.  Apparently this fails, which does not mean that the folder
161       is locked neither that it is unlocked.
162
163       Error: Unable to open POSIX lock file $filename for $folder: $!
164
165       For POSIX style locking, a folder it must be opened, which does not
166       succeed for the specified reason.
167
168       Error: Will never get a POSIX lock at $filename for $folder: $!
169
170       Tried to lock the folder, but it did not succeed.  The error code
171       received from the OS indicates that it will not succeed ever, so we do
172       not need to try again.
173

SEE ALSO

175       This module is part of Mail-Box distribution version 2.070, built on
176       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
177

LICENSE

179       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
180       ChangeLog.
181
182       This program is free software; you can redistribute it and/or modify it
183       under the same terms as Perl itself.  See
184       http://www.perl.com/perl/misc/Artistic.html
185
186
187
188perl v5.8.8                       2007-03-25       Mail::Box::Locker::POSIX(3)
Impressum