redis.lock.inc in Redis 7
Same filename and directory in other branches
Drupal core lock.inc replacement.
Do not use this file directly, it will be included by the backend specific implementation when added to settings.php file.
See README.txt file for details.
File
redis.lock.incView source
<?php
/**
* @file
* Drupal core lock.inc replacement.
*
* Do not use this file directly, it will be included by the backend specific
* implementation when added to settings.php file.
*
* See README.txt file for details.
*/
/**
* Foo function, keeping it for API consistency.
*/
function lock_initialize() {
}
/**
* Foo function, keeping it for API consistency.
* Some insane people may actually use it.
*/
function _lock_id() {
return Redis_Lock::getBackend()
->getLockId();
}
function lock_acquire($name, $timeout = 30.0) {
return Redis_Lock::getBackend()
->lockAcquire($name, $timeout);
}
function lock_may_be_available($name) {
return Redis_Lock::getBackend()
->lockMayBeAvailable($name);
}
function lock_wait($name, $delay = 30) {
return Redis_Lock::getBackend()
->lockWait($name, $delay);
}
function lock_release($name) {
return Redis_Lock::getBackend()
->lockRelease($name);
}
function lock_release_all($lock_id = NULL) {
return Redis_Lock::getBackend()
->lockReleaseAll($lock_id);
}
Functions
Name | Description |
---|---|
lock_acquire | |
lock_initialize | Foo function, keeping it for API consistency. |
lock_may_be_available | |
lock_release | |
lock_release_all | |
lock_wait | |
_lock_id | Foo function, keeping it for API consistency. Some insane people may actually use it. |