You are here

public function Redis_Lock_Backend_Default::getKey in Redis 7.2

Generate a redis key name for the current lock name

Overrides Redis_AbstractBackend::getKey

8 calls to Redis_Lock_Backend_Default::getKey()
Redis_Lock_Backend_PhpRedis::lockAcquire in lib/Redis/Lock/Backend/PhpRedis.php
Acquire lock.
Redis_Lock_Backend_PhpRedis::lockMayBeAvailable in lib/Redis/Lock/Backend/PhpRedis.php
Check if lock is available for acquire.
Redis_Lock_Backend_PhpRedis::lockRelease in lib/Redis/Lock/Backend/PhpRedis.php
Release given lock.
Redis_Lock_Backend_PhpRedis::lockReleaseAll in lib/Redis/Lock/Backend/PhpRedis.php
Release all locks for the given lock token identifier.
Redis_Lock_Backend_Predis::lockAcquire in lib/Redis/Lock/Backend/Predis.php
Acquire lock.

... See full list

File

lib/Redis/Lock/Backend/Default.php, line 81

Class

Redis_Lock_Backend_Default
Lock backend shared methods.

Code

public function getKey($name = null) {
  if (null === $name) {
    return parent::getKey('lock');
  }
  else {
    return parent::getKey('lock:' . $name);
  }
}