catch (LockConflictedException
$e) { $this->dirty = false;
$this->logger?->
info('Failed to acquire the "{resource}" lock. Someone else already acquired the lock.',
['resource' =>
$this->key
]);
if ($blocking) { throw $e;
} return false;
} catch (\Exception
$e) { $this->logger?->
notice('Failed to acquire the "{resource}" lock.',
['resource' =>
$this->key, 'exception' =>
$e]);
throw new LockAcquiringException(sprintf('Failed to acquire the "%s" lock.',
$this->key
), 0,
$e);
} } public function acquireRead(bool
$blocking = false
): bool
{ $this->key->
resetLifetime();
try { if (!
$this->store instanceof SharedLockStoreInterface
) { $this->logger?->
debug('Store does not support ReadLocks, fallback to WriteLock.',
['resource' =>
$this->key
]);
return $this->
acquire($blocking);
}