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.
21
22       WARNING: Not all platforms support POSIX locking (via fcntl) and not
23       always in the same way.  This implementation does not use XS to access
24       the structure of fcntl(): it is better to use the ::FcntlLock which
25       does.  No, this implementation "guesses" the location of the bytes.
26
27       Extends "DESCRIPTION" in Mail::Box::Locker.
28

METHODS

30       Extends "METHODS" in Mail::Box::Locker.
31
32   Constructors
33       Extends "Constructors" in Mail::Box::Locker.
34
35       Mail::Box::Locker::POSIX->new(%options)
36            -Option    --Defined in       --Default
37             expires     Mail::Box::Locker  1 hour
38             file        Mail::Box::Locker  undef
39             folder      Mail::Box::Locker  <undef>
40             log         Mail::Reporter     'WARNINGS'
41             method      Mail::Box::Locker  POSIX
42             posix_file                     <undef>
43             timeout     Mail::Box::Locker  10
44             trace       Mail::Reporter     'WARNINGS'
45
46           expires => SECONDS
47           file => FILENAME
48           folder => FOLDER
49           log => LEVEL
50           method => STRING|CLASS|ARRAY
51           posix_file => FILENAME
52             Alternative name for "file", especially useful to avoid confusion
53             when the multi-locker is used.
54
55           timeout => SECONDS|'NOTIMEOUT'
56           trace => LEVEL
57
58   Attributes
59       Extends "Attributes" in Mail::Box::Locker.
60
61       $obj->expires( [SECONDS] )
62           Inherited, see "Attributes" in Mail::Box::Locker
63
64       $obj->timeout( [SECONDS] )
65           Inherited, see "Attributes" in Mail::Box::Locker
66
67   The Locker
68       Extends "The Locker" in Mail::Box::Locker.
69
70       $obj->filename( [$filename] )
71           Inherited, see "The Locker" in Mail::Box::Locker
72
73       $obj->folder( [$folder] )
74           Inherited, see "The Locker" in Mail::Box::Locker
75
76       $obj->name()
77           Inherited, see "The Locker" in Mail::Box::Locker
78
79   Locking
80       Extends "Locking" in Mail::Box::Locker.
81
82       $obj->hasLock()
83           Inherited, see "Locking" in Mail::Box::Locker
84
85       $obj->isLocked()
86       $obj->lock()
87       $obj->unlock()
88           Inherited, see "Locking" in Mail::Box::Locker
89
90   Error handling
91       Extends "Error handling" in Mail::Box::Locker.
92
93       $obj->AUTOLOAD()
94           Inherited, see "Error handling" in Mail::Reporter
95
96       $obj->addReport($object)
97           Inherited, see "Error handling" in Mail::Reporter
98
99       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
100       $callback] )
101       Mail::Box::Locker::POSIX->defaultTrace( [$level]|[$loglevel,
102       $tracelevel]|[$level, $callback] )
103           Inherited, see "Error handling" in Mail::Reporter
104
105       $obj->errors()
106           Inherited, see "Error handling" in Mail::Reporter
107
108       $obj->log( [$level, [$strings]] )
109       Mail::Box::Locker::POSIX->log( [$level, [$strings]] )
110           Inherited, see "Error handling" in Mail::Reporter
111
112       $obj->logPriority($level)
113       Mail::Box::Locker::POSIX->logPriority($level)
114           Inherited, see "Error handling" in Mail::Reporter
115
116       $obj->logSettings()
117           Inherited, see "Error handling" in Mail::Reporter
118
119       $obj->notImplemented()
120           Inherited, see "Error handling" in Mail::Reporter
121
122       $obj->report( [$level] )
123           Inherited, see "Error handling" in Mail::Reporter
124
125       $obj->reportAll( [$level] )
126           Inherited, see "Error handling" in Mail::Reporter
127
128       $obj->trace( [$level] )
129           Inherited, see "Error handling" in Mail::Reporter
130
131       $obj->warnings()
132           Inherited, see "Error handling" in Mail::Reporter
133
134   Cleanup
135       Extends "Cleanup" in Mail::Box::Locker.
136
137       $obj->DESTROY()
138           Inherited, see "Cleanup" in Mail::Box::Locker
139

DIAGNOSTICS

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

SEE ALSO

164       This module is part of Mail-Box distribution version 3.009, built on
165       August 18, 2020. Website: http://perl.overmeer.net/CPAN/
166

LICENSE

168       Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see
169       ChangeLog.
170
171       This program is free software; you can redistribute it and/or modify it
172       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
173
174
175
176perl v5.32.0                      2020-08-20       Mail::Box::Locker::POSIX(3)
Impressum