NullLockBackend
class NullLockBackend implements LockBackendInterface (View source)
Defines a Null lock backend.
This implementation won't actually lock anything and will always succeed on lock attempts.
Properties
| protected string | $lockId | Current page lock token identifier. |
Methods
Acquires a lock.
Checks if a lock is available for acquiring.
Waits a short amount of time before a second lock acquire attempt.
Releases the given lock.
Releases all locks for the given lock token identifier.
Gets the unique page token for locks.
Details
bool
acquire(string $name, float $timeout = 30.0)
Acquires a lock.
bool
lockMayBeAvailable(string $name)
Checks if a lock is available for acquiring.
bool
wait(string $name, int $delay = 30)
Waits a short amount of time before a second lock acquire attempt.
While this method is subject to have a generic implementation in abstract backend implementation, some backends may provide non blocking or less I/O intensive wait mechanism: this is why this method remains on the backend interface.
release(string $name)
Releases the given lock.
releaseAll($lock_id = NULL)
Releases all locks for the given lock token identifier.
string
getLockId()
Gets the unique page token for locks.
Locks will be wiped out at the end of each page request on a token basis.