class Redis_Lock in Redis 7.2
Same name and namespace in other branches
- 7.3 lib/Redis/Lock.php \Redis_Lock
- 7 lib/Redis/Lock.php \Redis_Lock
Lock backend singleton handling.
Hierarchy
- class \Redis_Lock
Expanded class hierarchy of Redis_Lock
File
- lib/
Redis/ Lock.php, line 6
View source
class Redis_Lock {
/**
* @var Redis_Lock_Backend_Interface
*/
private static $instance;
/**
* Get actual lock backend.
*
* @return Redis_Lock_Backend_Interface
*/
public static function getBackend() {
if (!isset(self::$instance)) {
$className = Redis_Client::getClass(Redis_Client::REDIS_IMPL_LOCK);
self::$instance = new $className();
}
return self::$instance;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Redis_Lock:: |
private static | property | ||
Redis_Lock:: |
public static | function | Get actual lock backend. |