function ZookeeperStore::delete
Overrides PersistingStoreInterface::delete
File
-
vendor/
symfony/ lock/ Store/ ZookeeperStore.php, line 72
Class
- ZookeeperStore
- ZookeeperStore is a PersistingStoreInterface implementation using Zookeeper as store engine.
Namespace
Symfony\Component\Lock\StoreCode
public function delete(Key $key) : void {
if (!$this->exists($key)) {
return;
}
$resource = $this->getKeyResource($key);
try {
$this->zookeeper
->delete($resource);
} catch (\ZookeeperException $exception) {
// For Zookeeper Ephemeral Nodes, the node will be deleted upon session death. But, if we want to unlock
// the lock before proceeding further in the session, the client should be aware of this
throw new LockReleasingException($exception);
}
}