You are here

public function LockBackendInterface::acquire in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/Lock/LockBackendInterface.php \Drupal\Core\Lock\LockBackendInterface::acquire()

Acquires a lock.

Parameters

string $name: Lock name. Limit of name's length is 255 characters.

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

Return value

bool

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

File

lib/Drupal/Core/Lock/LockBackendInterface.php, line 81
Contains \Drupal\Core\Lock\LockBackendInterface.

Class

LockBackendInterface
Lock backend interface.

Namespace

Drupal\Core\Lock

Code

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