You are here

public function MemcacheLockBackend::lockMayBeAvailable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/memcache/src/MemcacheLockBackend.php \Drupal\memcache\MemcacheLockBackend::lockMayBeAvailable()

Checks if a lock is available for acquiring.

Parameters

string $name: Lock to acquire.

Return value

bool

Overrides LockBackendInterface::lockMayBeAvailable

File

modules/memcache/src/MemcacheLockBackend.php, line 76
Contains \Drupal\memcache\MemcacheLockBackend.

Class

MemcacheLockBackend
Defines a Memcache lock backend.

Namespace

Drupal\memcache

Code

public function lockMayBeAvailable($name) {
  return !$this->memcache
    ->get($name);
}