Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NoLock.php

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\Lock
View 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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal