NAME
Mail::Box::Locker::Multi - lock a folder in all ways which work
CLASS INHERITANCE
Mail::Box::Locker::Multi is a Mail::Box::Locker is a Mail::Reporter
SYNOPSIS
See Mail::Box::Locker
DESCRIPTION
The ::Multi
locker locks a folder in each way it can. This way, the chance is highest that any other program will leave the folder alone during our access to it.
NFS-lock and Flock are tried. More may be added when the ways to lock are extended. DotLock overlaps with NFS-lock, but NFS-lock is safer, so that version is preferred.
METHODS
Initiation
- new OPTIONS
-
OPTION DEFAULT expires 1 hour file undef folder <obligatory> log 'WARNINGS' method 'DOTLOCK' timeout 10 seconds trace 'WARNINGS' use <all possible>
- expires => SECONDS
-
See Mail::Box::Locker::new(expires)
- file => FILENAME
-
See Mail::Box::Locker::new(file)
- folder => FOLDER
-
See Mail::Box::Locker::new(folder)
- log => LEVEL
-
See Mail::Reporter::new(log)
- method => METHOD | CLASS
-
See Mail::Box::Locker::new(method)
- timeout => SECONDS|'NOTIMEOUT'
-
See Mail::Box::Locker::new(timeout)
- trace => LEVEL
-
See Mail::Reporter::new(trace)
- use => ARRAY
-
Array of locker types and locker objects to be used to lock one folder. The type names are converted into objects.
Some locking types are not available on some platforms, so they will not be excluded from the default list (NFS POSIX Flock).
The Locker
- DESTROY
-
See Mail::Box::Locker::DESTROY()
- filename
-
See Mail::Box::Locker::filename()
- lockers
-
Returns a list with all locker objects used by this object.
- name
-
See Mail::Box::Locker::name()
Locking
- hasLock
-
See Mail::Box::Locker::hasLock()
- isLocked
-
See Mail::Box::Locker::isLocked()
- lock FOLDER
-
See Mail::Box::Locker::lock()
- unlock
-
See Mail::Box::Locker::unlock()
Logging and Tracing
- defaultTrace [LEVEL, [LEVEL]
-
See Mail::Reporter::defaultTrace()
- errors
-
See Mail::Reporter::errors()
- log [LEVEL [,STRINGS]]
-
See Mail::Reporter::log()
- report [LEVEL]
-
See Mail::Reporter::report()
- reportAll [LEVEL]
-
See Mail::Reporter::reportAll()
- trace [LEVEL]
-
See Mail::Reporter::trace()
- warnings
-
See Mail::Reporter::warnings()
Other Methods
- AUTOLOAD
-
See Mail::Reporter::AUTOLOAD()
- inGlobalDestruction
-
See Mail::Reporter::inGlobalDestruction()
- logPriority LEVEL
-
See Mail::Reporter::logPriority()
- logSettings
-
See Mail::Reporter::logSettings()
- notImplemented
-
See Mail::Reporter::notImplemented()
SEE ALSO
A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.
AUTHOR
Mark Overmeer (mark@overmeer.net) with the help of many.
VERSION
This code is beta, version 2.022.
Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.