PHP Class NinjaMutex\Lock\PhpRedisLock

Author: leo108 ([email protected])
Inheritance: extends NinjaMutex\Lock\LockAbstract
Exibir arquivo Open project: arvenil/ninja-mutex

Protected Properties

Property Type Description
$client phpredis connection

Public Methods

Method Description
__construct ( Redis $client )
isLocked ( string $name ) : boolean Check if lock is locked
releaseLock ( string $name ) : boolean Release lock

Protected Methods

Method Description
getLock ( string $name, boolean $blocking ) : boolean

Method Details

__construct() public method

public __construct ( Redis $client )
$client Redis Redis

getLock() protected method

protected getLock ( string $name, boolean $blocking ) : boolean
$name string
$blocking boolean
return boolean

isLocked() public method

Check if lock is locked
public isLocked ( string $name ) : boolean
$name string name of lock
return boolean

releaseLock() public method

Release lock
public releaseLock ( string $name ) : boolean
$name string name of lock
return boolean

Property Details

$client protected_oe property

phpredis connection
protected $client