acquire() public method Acquires a lock by name. public boolean acquire ( $name, $timeout = 0 )$name string Of the lock to be acquired. Must be unique. $timeout integer Time to wait for lock to be released. Defaults to zero meaning that method will return false immediately in case lock was already acquired. return boolean Lock acquiring result.
releaseLock() protected abstract method This method should be extended by a concrete Mutex implementations. Releases lock by given name. protected abstract boolean releaseLock ( $name )$name string Of the lock to be released. return boolean Release result.
init() public method Initializes the Mutex component. public void init ( )
acquireLock() protected abstract method This method should be extended by a concrete Mutex implementations. Acquires lock by name. protected abstract boolean acquireLock ( $name, $timeout = 0 )$name string Of the lock to be acquired. $timeout integer Time to wait for the lock to be released. return boolean Acquiring result.
release() public method Releases acquired lock. This method will return false in case the lock was not found. public boolean release ( $name )$name string Of the lock to be released. This lock must already exist. return boolean Lock release result: false in case named lock was not found..
init() public method Initializes mutex component implementation dedicated for UNIX, GNU/Linux, Mac OS X, and other UNIX-like operating systems. public void init ( )throws yii\base\InvalidConfigException
$autoRelease public property Whether all locks acquired in this process (i.e. local locks) must be released automatically before finishing script execution. Defaults to true. Setting this property to true means that all locks acquired in this process must be released (regardless of errors or exceptions). public boolean $autoRelease = true
releaseLock() protected method Releases lock by given name. protected boolean releaseLock ( $name )$name string Of the lock to be released. return boolean Release result.
getLockFilePath() protected method (available since version 2.0.10) Generate path for lock file. protected string getLockFilePath ( $name )$name string
$fileMode public property The permission to be set for newly created mutex files. This value will be used by PHP chmod() function. No umask will be applied. If not set, the permission will be determined by the current environment. public integer $fileMode = null
Page 189 of 633