class MongodbLockPersistent in MongoDB 8
Hierarchy
- class \Drupal\Core\Lock\LockBackendAbstract implements LockBackendInterface- class \Drupal\mongodb\MongodbLock- class \Drupal\mongodb\MongodbLockPersistent
 
 
- class \Drupal\mongodb\MongodbLock
Expanded class hierarchy of MongodbLockPersistent
1 string reference to 'MongodbLockPersistent'
1 service uses MongodbLockPersistent
File
- src/MongodbLockPersistent.php, line 10 
- Contains \Drupal\mongodb\MongodbLockPersistent.
Namespace
Drupal\mongodbView source
class MongodbLockPersistent extends MongodbLock {
  public function __construct(MongoCollectionFactory $mongo) {
    // Do not call the parent constructor to avoid registering a shutdown
    // function that releases all the locks at the end of a request.
    $this->mongo = $mongo;
    // Set the lockId to a fixed string to make the lock ID the same across
    // multiple requests. The lock ID is used as a page token to relate all the
    // locks set during a request to each other.
    // @see \Drupal\Core\Lock\LockBackendInterface::getLockId()
    $this->lockId = 'persistent';
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| LockBackendAbstract:: | protected | property | Current page lock token identifier. | |
| LockBackendAbstract:: | protected | property | Existing locks for this page. | |
| LockBackendAbstract:: | public | function | Gets the unique page token for locks. Overrides LockBackendInterface:: | |
| LockBackendAbstract:: | public | function | Waits a short amount of time before a second lock acquire attempt. Overrides LockBackendInterface:: | |
| MongodbLock:: | protected | property | The mongodb factory registered as a service. | |
| MongodbLock:: | public | function | Acquires a lock. Overrides LockBackendInterface:: | |
| MongodbLock:: | public | function | Checks if a lock is available for acquiring. Overrides LockBackendInterface:: | |
| MongodbLock:: | protected | function | ||
| MongodbLock:: | protected | function | ||
| MongodbLock:: | public | function | Releases the given lock. Overrides LockBackendInterface:: | |
| MongodbLock:: | public | function | Releases all locks for the given lock token identifier. Overrides LockBackendInterface:: | |
| MongodbLockPersistent:: | public | function | Construct the DatabaseFileUsageBackend. Overrides MongodbLock:: | 
