LockManager
class LockManager (View source)
The Lock Manager controls the master lock of the whole site which is mainly used to regenerate code caches in peace.
Constants
LOCKFILE_MAXIMUM_AGE |
|
Properties
protected string | $lockPathAndFilename | This file contains the actual lock, set via \flock() in lockSiteOrExit() |
|
protected string | $lockFlagPathAndFilename | This file is used to track the status of the site lock: If it exists the site is considered locked. |
|
protected string | $lockHoldingPage | ||
protected resource | $lockResource |
Methods
Initializes the manager, removing expired locks
Returns the absolute path to a directory that should contain the lock files
No description
Tells if the site is currently locked
Exits if the site is currently locked
Locks the site for further requests.
Unlocks the site if this request has locked it.
Exit and emit a message about the reason.
Details
__construct()
Initializes the manager, removing expired locks
protected string
getLockPath()
Returns the absolute path to a directory that should contain the lock files
protected void
removeExpiredLock()
No description
bool
isSiteLocked()
Tells if the site is currently locked
void
exitIfSiteLocked()
Exits if the site is currently locked
void
lockSiteOrExit()
Locks the site for further requests.
void
unlockSite()
Unlocks the site if this request has locked it.
protected void
doExit()
Exit and emit a message about the reason.