public function LockBackendInterface::acquire

Acquires a lock.

Parameters

string $name: Lock name.

float $timeout = 30.0: (optional) Lock lifetime in seconds.

Return value

bool

2 methods override LockBackendInterface::acquire()
DatabaseLockBackend::acquire in drupal/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php
Implements Drupal\Core\Lock\LockBackedInterface::acquire().
NullLockBackend::acquire in drupal/core/lib/Drupal/Core/Lock/NullLockBackend.php
Implements Drupal\Core\Lock\LockBackedInterface::acquire().

File

drupal/core/lib/Drupal/Core/Lock/LockBackendInterface.php, line 25
Definition of Drupal\Core\Lock\LockBackendInterface.

Class

LockBackendInterface
Lock backend interface.

Namespace

Drupal\Core\Lock

Code

public function acquire($name, $timeout = 30.0);