PHP 클래스 yii\mutex\PgsqlMutex

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

공개 메소드들

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

보호된 메소드들

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

비공개 메소드들

메소드 설명
getKeysFromName ( string $name ) : array Converts a string into two 16 bit integer keys using the SHA1 hash function.

메소드 상세

acquireLock() 보호된 메소드

Acquires lock by given name.
또한 보기: http://www.postgresql.org/docs/9.0/static/functions-admin.html
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 PgSQL specific mutex component implementation.
public init ( )

releaseLock() 보호된 메소드

Releases lock by given name.
또한 보기: http://www.postgresql.org/docs/9.0/static/functions-admin.html
protected releaseLock ( string $name ) : boolean
$name string of the lock to be released.
리턴 boolean release result.