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
21       locking.
22

METHODS

24   Constructors
25       Mail::Box::Locker::POSIX->new(OPTIONS)
26            -Option    --Defined in     --Default
27             expires     Mail::Box::Locker  1 hour
28             file        Mail::Box::Locker  undef
29             folder      Mail::Box::Locker  <undef>
30             log         Mail::Reporter   'WARNINGS'
31             method      Mail::Box::Locker  POSIX
32             posix_file                   <undef>
33             timeout     Mail::Box::Locker  10 seconds
34             trace       Mail::Reporter   'WARNINGS'
35
36           expires => SECONDS
37           file => FILENAME
38           folder => FOLDER
39           log => LEVEL
40           method => STRING|CLASS|ARRAY
41           posix_file => FILENAME
42             Alternative name for "file", especially useful to avoid confusion
43             when the multi-locker is used.
44
45           timeout => SECONDS|'NOTIMEOUT'
46           trace => LEVEL
47
48   The Locker
49       $obj->filename([FILENAME])
50           See "The Locker" in Mail::Box::Locker
51
52       $obj->folder([FOLDER])
53           See "The Locker" in Mail::Box::Locker
54
55       $obj->name
56           See "The Locker" in Mail::Box::Locker
57
58   Locking
59       $obj->hasLock
60           See "Locking" in Mail::Box::Locker
61
62       $obj->isLocked
63       $obj->lock
64       $obj->unlock
65           See "Locking" in Mail::Box::Locker
66
67   Error handling
68       $obj->AUTOLOAD
69           See "Error handling" in Mail::Reporter
70
71       $obj->addReport(OBJECT)
72           See "Error handling" in Mail::Reporter
73
74       $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
75           Mail::Box::Locker::POSIX->defaultTrace([LEVEL]|[LOGLEVEL,
76           TRACELEVEL]|[LEVEL, CALLBACK])
77
78           See "Error handling" in Mail::Reporter
79
80       $obj->errors
81           See "Error handling" in Mail::Reporter
82
83       $obj->log([LEVEL [,STRINGS]])
84           Mail::Box::Locker::POSIX->log([LEVEL [,STRINGS]])
85
86           See "Error handling" in Mail::Reporter
87
88       $obj->logPriority(LEVEL)
89           Mail::Box::Locker::POSIX->logPriority(LEVEL)
90
91           See "Error handling" in Mail::Reporter
92
93       $obj->logSettings
94           See "Error handling" in Mail::Reporter
95
96       $obj->notImplemented
97           See "Error handling" in Mail::Reporter
98
99       $obj->report([LEVEL])
100           See "Error handling" in Mail::Reporter
101
102       $obj->reportAll([LEVEL])
103           See "Error handling" in Mail::Reporter
104
105       $obj->trace([LEVEL])
106           See "Error handling" in Mail::Reporter
107
108       $obj->warnings
109           See "Error handling" in Mail::Reporter
110
111   Cleanup
112       $obj->DESTROY
113           See "Cleanup" in Mail::Box::Locker
114
115       $obj->inGlobalDestruction
116           See "Cleanup" in Mail::Reporter
117

DIAGNOSTICS

119       Warning: Folder $folder already lockf'd
120       Error: Package $package does not implement $method.
121           Fatal error: the specific package (or one of its superclasses) does
122           not implement this method where it should. This message means that
123           some other related classes do implement this method however the
124           class at hand does not.  Probably you should investigate this and
125           probably inform the author of the package.
126
127       Error: Unable to check lock file $filename for $folder: $!
128           To check whether the filename is used to flock a folder, the file
129           must be opened.  Apparently this fails, which does not mean that
130           the folder is locked neither that it is unlocked.
131
132       Error: Unable to open POSIX lock file $filename for $folder: $!
133           For POSIX style locking, a folder it must be opened, which does not
134           succeed for the specified reason.
135
136       Error: Will never get a POSIX lock at $filename for $folder: $!
137           Tried to lock the folder, but it did not succeed.  The error code
138           received from the OS indicates that it will not succeed ever, so we
139           do not need to try again.
140

SEE ALSO

142       This module is part of Mail-Box distribution version 2.097, built on
143       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
144

LICENSE

146       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
147       ChangeLog.
148
149       This program is free software; you can redistribute it and/or modify it
150       under the same terms as Perl itself.  See
151       http://www.perl.com/perl/misc/Artistic.html
152
153
154
155perl v5.12.3                      2011-01-26       Mail::Box::Locker::POSIX(3)
Impressum