A simple file based locking mechanism.

package Gems
subpackage Util
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.4.4

 Methods

__construct()

__construct(string $lockFileName) 

Parameters

$lockFileName

string

The name of the lockfile

Last time the lock was set.

getLockTime() : \MUtil_Date

Returns

\MUtil_Dateor null when not locked.

Returns true if this lock exists.

isLocked() : boolean

Returns

boolean

Lock this file and updates lock time.

lock() : \Gems_Util_LockFile

Returns

\Gems_Util_LockFile(continuation pattern)

Switches from lock to unlocked state.

reverse() : \Gems_Util_LockFile

Returns

\Gems_Util_LockFile(continuation pattern)

Unlocks this lock file by deleting it

unlock() : \Gems_Util_LockFile

Returns

\Gems_Util_LockFile(continuation pattern)

 Properties

 

$lockFileName

$lockFileName : string

Default