PHP 클래스 malkusch\lock\mutex\SpinlockMutex

저자: Markus Malkusch ([email protected])
상속: extends LockMutex
파일 보기 프로젝트 열기: malkusch/lock 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $name, integer $timeout = 3 ) Sets the timeout.

보호된 메소드들

메소드 설명
acquire ( string $key, integer $expire ) : boolean Tries to acquire a lock.
lock ( )
release ( string $key ) : boolean Tries to release a lock.
unlock ( )

메소드 상세

__construct() 공개 메소드

Sets the timeout.
public __construct ( $name, integer $timeout = 3 )
$timeout integer The time in seconds a lock expires, default is 3.

acquire() 추상적인 보호된 메소드

Tries to acquire a lock.
abstract protected acquire ( string $key, integer $expire ) : boolean
$key string The lock key.
$expire integer The timeout in seconds when a lock expires.
리턴 boolean True, if the lock could be acquired.

lock() 보호된 메소드

protected lock ( )

release() 추상적인 보호된 메소드

Tries to release a lock.
abstract protected release ( string $key ) : boolean
$key string The lock key.
리턴 boolean True, if the lock could be released.

unlock() 보호된 메소드

protected unlock ( )