Doc comments for the 'mutex' classes extended

This commit is contained in:
Klimov Paul
2014-05-29 11:43:23 +03:00
parent f1f158aa68
commit 9e320dafc6
4 changed files with 47 additions and 0 deletions

View File

@ -13,6 +13,10 @@ use yii\base\InvalidConfigException;
use yii\di\Instance;
/**
* DbMutex is the base class for classes, which relies on database while implementing mutex "lock" mechanism.
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/

View File

@ -12,6 +12,29 @@ use yii\base\InvalidConfigException;
use yii\helpers\FileHelper;
/**
* FileMutex implements mutex "lock" mechanism via local file system files.
* This component relies on PHP `flock()` function.
*
* Application configuration example:
*
* ```
* [
* 'components' => [
* 'mutex'=> [
* 'class' => 'yii\mutex\FileMutex'
* ],
* ],
* ]
* ```
*
* Note: this component can maintain the locks only for the single web server,
* it probably will not suffice to your in case you are using cloud server solution.
*
* Warning: due to `flock()` function nature this component is unreliable when
* using a multithreaded server API like ISAPI.
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/

Binary file not shown.

View File

@ -11,6 +11,26 @@ use Yii;
use yii\base\InvalidConfigException;
/**
* MysqlMutex implements mutex "lock" mechanism via MySQL locks.
*
* Application configuration example:
*
* ```
* [
* 'components' => [
* 'db'=> [
* 'class' => 'yii\db\Connection',
* 'dsn' => 'mysql:host=127.0.0.1;dbname=demo',
* ]
* 'mutex'=> [
* 'class' => 'yii\mutex\MysqlMutex',
* ],
* ],
* ]
* ```
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/