interface Redis_Lock_Backend_Interface in Redis 7
Same name and namespace in other branches
- 7.2 lib/Redis/Lock/Backend/Interface.php \Redis_Lock_Backend_Interface
Lock backend interface.
Hierarchy
- interface \Redis_Lock_Backend_Interface
Expanded class hierarchy of Redis_Lock_Backend_Interface
All classes that implement Redis_Lock_Backend_Interface
File
- lib/
Redis/ Lock/ Backend/ Interface.php, line 6
View source
interface Redis_Lock_Backend_Interface {
/**
* Acquire lock.
*
* @param string $name
* Lock name.
* @param float $timeout = 30.0
* (optional) Lock lifetime in seconds.
*
* @return bool
*/
public function lockAcquire($name, $timeout = 30.0);
/**
* Check if lock is available for acquire.
*
* @param string $name
* Lock to acquire.
*
* @return bool
*/
public function lockMayBeAvailable($name);
/**
* Wait a short amount of time before a second lock acquire attempt.
*
* @param string $name
* Lock name currently being locked.
* @param int $delay = 30
* Miliseconds to wait for.
*/
public function lockWait($name, $delay = 30);
/**
* Release given lock.
*
* @param string $name
*/
public function lockRelease($name);
/**
* Release all locks for the given lock token identifier.
*
* @param string $lockId = NULL
* (optional) If none given, remove all lock from the current page.
*/
public function lockReleaseAll($lock_id = NULL);
/**
* Get the unique page token for locks. Locks will be wipeout at each end of
* page request on a token basis.
*
* @return string
*/
public function getLockId();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Redis_Lock_Backend_Interface:: |
public | function | Get the unique page token for locks. Locks will be wipeout at each end of page request on a token basis. | 1 |
Redis_Lock_Backend_Interface:: |
public | function | Acquire lock. | 2 |
Redis_Lock_Backend_Interface:: |
public | function | Check if lock is available for acquire. | 2 |
Redis_Lock_Backend_Interface:: |
public | function | Release given lock. | 2 |
Redis_Lock_Backend_Interface:: |
public | function | Release all locks for the given lock token identifier. | 2 |
Redis_Lock_Backend_Interface:: |
public | function | Wait a short amount of time before a second lock acquire attempt. | 1 |