PHP Class NinjaMutex\Tests\Mock\MockLock

Author: Kamil Dziedzic ([email protected])
Inheritance: implements NinjaMutex\Lock\LockInterface
Afficher le fichier Open project: arvenil/ninja-mutex Class Usage Examples

Protected Properties

Свойство Type Description
$available boolean Whether the service is available
$counter integer Lock counter to protect against recursive deadlock

Méthodes publiques

Méthode Description
acquireLock ( string $name, null | integer $timeout = null ) : boolean
isLocked ( $name ) : boolean
releaseLock ( $name ) : boolean
setAvailable ( boolean $available )

Method Details

acquireLock() public méthode

public acquireLock ( string $name, null | integer $timeout = null ) : boolean
$name string
$timeout null | integer
Résultat boolean

isLocked() public méthode

public isLocked ( $name ) : boolean
$name
Résultat boolean

releaseLock() public méthode

public releaseLock ( $name ) : boolean
$name
Résultat boolean

setAvailable() public méthode

public setAvailable ( boolean $available )
$available boolean

Property Details

$available protected_oe property

Whether the service is available
protected bool $available
Résultat boolean

$counter protected_oe property

Lock counter to protect against recursive deadlock
protected int $counter
Résultat integer