PHP 클래스 yii\mutex\MysqlMutex

Application configuration example: [ 'components' => [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1;dbname=demo', ] 'mutex' => [ 'class' => 'yii\mutex\MysqlMutex', ], ], ]
또한 보기: Mutex
부터: 2.0
저자: resurtm ([email protected])
상속: extends yii\mutex\DbMutex
파일 보기 프로젝트 열기: yiisoft/yii2

공개 메소드들

메소드 설명
init ( ) Initializes MySQL specific mutex component implementation.

보호된 메소드들

메소드 설명
acquireLock ( string $name, integer $timeout ) : boolean Acquires lock by given name.
releaseLock ( string $name ) : boolean Releases lock by given name.

메소드 상세

acquireLock() 보호된 메소드

Acquires lock by given name.
또한 보기: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock
protected acquireLock ( string $name, integer $timeout ) : boolean
$name string of the lock to be acquired.
$timeout integer to wait for lock to become released.
리턴 boolean acquiring result.

init() 공개 메소드

Initializes MySQL specific mutex component implementation.
public init ( )

releaseLock() 보호된 메소드

Releases lock by given name.
또한 보기: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock
protected releaseLock ( string $name ) : boolean
$name string of the lock to be released.
리턴 boolean release result.