class NoLock
A non locking lock.
This can be used to disable locking in classes requiring a lock.
@author Wouter de Jong <wouter@wouterj.nl>
Hierarchy
- class \Symfony\Component\Lock\NoLock implements \Symfony\Component\Lock\SharedLockInterface
Expanded class hierarchy of NoLock
File
-
vendor/
symfony/ lock/ NoLock.php, line 22
Namespace
Symfony\Component\LockView source
final class NoLock implements SharedLockInterface {
public function acquireRead(bool $blocking = false) : bool {
return true;
}
public function acquire(bool $blocking = false) : bool {
return true;
}
public function refresh(?float $ttl = null) : void {
}
public function isAcquired() : bool {
return true;
}
public function release() : void {
}
public function isExpired() : bool {
return false;
}
public function getRemainingLifetime() : ?float {
return null;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
NoLock::acquire | public | function | Acquires the lock. If the lock is acquired by someone else, the parameter `blocking` determines whether or not the call should block until the release of the lock. |
Overrides LockInterface::acquire |
NoLock::acquireRead | public | function | Acquires the lock for reading. If the lock is acquired by someone else in write mode, the parameter `blocking` determines whether or not the call should block until the release of the lock. |
Overrides SharedLockInterface::acquireRead |
NoLock::getRemainingLifetime | public | function | Returns the remaining lifetime in seconds. | Overrides LockInterface::getRemainingLifetime |
NoLock::isAcquired | public | function | Returns whether or not the lock is acquired. | Overrides LockInterface::isAcquired |
NoLock::isExpired | public | function | Overrides LockInterface::isExpired | |
NoLock::refresh | public | function | Increase the duration of an acquired lock. | Overrides LockInterface::refresh |
NoLock::release | public | function | Release the lock. | Overrides LockInterface::release |