PHP Class Metabor\Adapter\NinjaMutexLockAdapter

Author: Oliver Tischlinger
Inheritance: implements MetaborStd\Semaphore\LockAdapterInterface
Afficher le fichier Open project: metabor/statemachine

Méthodes publiques

Méthode Description
__construct ( NinjaMutex\Lock\LockInterface $ninjaMutexLock, null | integer $timeout = null )
acquireLock ( string $resourceName ) : boolean
isLocked ( string $resourceName ) : boolean
releaseLock ( string $resourceName ) : boolean

Method Details

__construct() public méthode

public __construct ( NinjaMutex\Lock\LockInterface $ninjaMutexLock, null | integer $timeout = null )
$ninjaMutexLock NinjaMutex\Lock\LockInterface
$timeout null | integer 1. null if you want blocking lock 2. 0 if you want just lock and go 3. $timeout > 0 if you want to wait for lock some time (in milliseconds)

acquireLock() public méthode

public acquireLock ( string $resourceName ) : boolean
$resourceName string
Résultat boolean

isLocked() public méthode

public isLocked ( string $resourceName ) : boolean
$resourceName string
Résultat boolean

releaseLock() public méthode

public releaseLock ( string $resourceName ) : boolean
$resourceName string
Résultat boolean